Skip to content

Conversation

@emaceda
Copy link
Contributor

@emaceda emaceda commented Feb 5, 2025

Description
Resolve an error when CSP is enabled and use debugbar in development environment, the style attribute in the table (from the collector) cause an error in browser console, changing the style attribute to a width attribute fix the issue.

index.php?debugbar:46 Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self' 'nonce-98f45b1a6e3d510a2fe4474e'". Either the 'unsafe-inline' keyword, a hash ('sha256-AjG9eor6SyhAUzJE5wyV4y7++Gv+bkiPYFnboahgMlA='), or a nonce ('nonce-...') is required to enable inline execution. Note that hashes do not apply to event handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword is present.

Resolve an error when CSP is enabled, the style attribute in the table cause an error in console.
@emaceda emaceda changed the title Fix CSP error in debugbar fix: CSP error in debugbar Feb 5, 2025
@datamweb datamweb added the bug Something isn't working label Feb 6, 2025
Copy link
Collaborator

@datamweb datamweb left a comment

Choose a reason for hiding this comment

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

@emaceda Thanks!
LGTM!

@datamweb datamweb merged commit dca828a into codeigniter4:develop Feb 6, 2025
9 of 31 checks passed
@michalsn michalsn mentioned this pull request Jul 14, 2025
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants