Skip to content

Commit

Permalink
Fix XSS on uploaded files to the file storage
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasDorier committed Jan 26, 2023
1 parent 438dcc4 commit d4e464a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions BTCPayServer/Storage/StorageExtensions.cs
Expand Up @@ -75,6 +75,7 @@ private static Action<StaticFileResponseContext> HandleStaticFileResponse()
{
context.Context.Response.Headers["Content-Disposition"] = "attachment";
}
context.Context.Response.Headers["Content-Security-Policy"] = "script-src 'self'";
};
}
}
Expand Down

0 comments on commit d4e464a

Please sign in to comment.