Skip to content

fix: Hardcoded CSP Nonce Tags in ResponseTrait#9937

Merged
paulbalandan merged 15 commits intocodeigniter4:developfrom
patel-vansh:fix/hardcoded-csp-tags
Feb 15, 2026
Merged

fix: Hardcoded CSP Nonce Tags in ResponseTrait#9937
paulbalandan merged 15 commits intocodeigniter4:developfrom
patel-vansh:fix/hardcoded-csp-tags

Conversation

@patel-vansh
Copy link
Contributor

Description
This PR fixes #9935.

Created one method in system/HTTP/ContentSecurityPolicy.php to clear all nonce placeholders.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@michalsn michalsn added the bug Verified issues on the current code behavior or pull requests that will fix them label Feb 8, 2026
Copy link
Member

@paulbalandan paulbalandan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests don't make sense. You should be testing instead the behavior when the response is sent when CSP is not enabled.

Co-authored-by: John Paul E. Balandan, CPA <paulbalandan@gmail.com>
@patel-vansh patel-vansh force-pushed the fix/hardcoded-csp-tags branch from 97b1297 to 65b1a04 Compare February 10, 2026 04:50
@michalsn
Copy link
Member

@patel-vansh Please rebase to resolve conflicts.

@patel-vansh
Copy link
Contributor Author

@michalsn Done.

Copy link
Member

@paulbalandan paulbalandan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

Copy link
Member

@michalsn michalsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@paulbalandan paulbalandan merged commit 615ef4d into codeigniter4:develop Feb 15, 2026
50 checks passed
@paulbalandan
Copy link
Member

Thank you, @patel-vansh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Verified issues on the current code behavior or pull requests that will fix them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Hardcoded CSP Nonce Tags in ResponseTrait

3 participants