Skip to content

Commit

Permalink
Merge pull request #45 from santoru/hotfix-csp
Browse files Browse the repository at this point in the history
Fix AttributeError on CSP
  • Loading branch information
santoru authored May 6, 2024
2 parents 123fc89 + 045050c commit bbcbc11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from setuptools import setup

PACKAGE_NAME = "shcheck"
VERSION = "1.6.2"
VERSION = "1.6.3"

with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
Expand Down
2 changes: 1 addition & 1 deletion shcheck/shcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def main():
json_results["missing"] = []

# Before parsing, remove X-Frame-Options if there's CSP with frame-ancestors directive
if "frame-ancestors" in headers.get('Content-Security-Policy'.lower()).lower():
if "Content-Security-Policy".lower() in str(headers).lower() and "frame-ancestors" in headers.get('Content-Security-Policy'.lower()).lower():
sec_headers.pop("X-Frame-Options")
headers.pop("X-Frame-Options".lower())

Expand Down

0 comments on commit bbcbc11

Please sign in to comment.