Skip to content

Conversation

@paulbalandan
Copy link
Member

Description
Per CSP specification, CSP nonces are base64 encoded values appended to nonce-. In the framework's implementation, we're using bin2hex which results in hexadecimal encoded values instead.

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

@paulbalandan paulbalandan added the bug Verified issues on the current code behavior or pull requests that will fix them label Feb 1, 2026
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.

Nice catch.

@paulbalandan paulbalandan force-pushed the csp-nonces branch 2 times, most recently from c4c091f to fd0cc1c Compare February 1, 2026 11:36
@paulbalandan paulbalandan merged commit 4cdbee1 into codeigniter4:develop Feb 1, 2026
50 checks passed
@paulbalandan paulbalandan deleted the csp-nonces branch February 1, 2026 13:48
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.

2 participants