Skip to content

Commit

Permalink
Also emit the CSP hash in a meta tag
Browse files Browse the repository at this point in the history
  • Loading branch information
explunit committed May 31, 2019
1 parent b4d5470 commit 3119979
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sustainsys.Saml2/WebSSO/Saml2PostBinding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ public override CommandResult Bind(ISaml2Message message, ILoggerAdapter logger)
<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.1//EN""
""http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"">
<html xmlns=""http://www.w3.org/1999/xhtml"" xml:lang=""en"">
<head>
<meta http-equiv=""Content-Security-Policy"" content=""script-src 'sha256-P3ctnFLM5WKMitbWbZPkh7TsbhvCPtdF7mlwMUv2pgc='"">
</head>
<body>
<noscript>
<p>
Expand Down
9 changes: 9 additions & 0 deletions Tests/Tests.Shared/WebSSO/Saml2PostBindingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,9 @@ public void Saml2PostBinding_Bind()
<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.1//EN""
""http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"">
<html xmlns=""http://www.w3.org/1999/xhtml"" xml:lang=""en"">
<head>
<meta http-equiv=""Content-Security-Policy"" content=""script-src 'sha256-P3ctnFLM5WKMitbWbZPkh7TsbhvCPtdF7mlwMUv2pgc='"">
</head>
<body>
<noscript>
<p>
Expand Down Expand Up @@ -181,6 +184,9 @@ public void Saml2PostBinding_Bind_WithRelayState()
<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.1//EN""
""http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"">
<html xmlns=""http://www.w3.org/1999/xhtml"" xml:lang=""en"">
<head>
<meta http-equiv=""Content-Security-Policy"" content=""script-src 'sha256-P3ctnFLM5WKMitbWbZPkh7TsbhvCPtdF7mlwMUv2pgc='"">
</head>
<body>
<noscript>
<p>
Expand Down Expand Up @@ -235,6 +241,9 @@ public void Saml2PostBinding_Bind_SignsXml()
<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.1//EN""
""http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"">
<html xmlns=""http://www.w3.org/1999/xhtml"" xml:lang=""en"">
<head>
<meta http-equiv=""Content-Security-Policy"" content=""script-src 'sha256-P3ctnFLM5WKMitbWbZPkh7TsbhvCPtdF7mlwMUv2pgc='"">
</head>
<body>
<noscript>
<p>
Expand Down

0 comments on commit 3119979

Please sign in to comment.