-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ContentSecurityPolicy::setReportURI() shoud accept null values #9091
Comments
Do you set the default It seems |
Hello kenjis. |
If you want to change Config settings by an admin panel, we have https://github.com/codeigniter4/settings In any case, you can remove the If we change the |
PHP Version
8.1
CodeIgniter4 Version
4.5.3
CodeIgniter4 Installation Method
Composer (using
codeigniter4/appstarter
)Which operating systems have you tested for this bug?
Windows
Which server did you use?
apache
Database
MySQL 8.0.30
What happened?
Trying to set with runntime $reportURI property from app/Config/ContentSecurityPolicy.php to null in BaseController, throws an exception:
This shoud happen because $reportURI from app/Config/ContentSecurityPolicy.php accept ?string. The sabe the core config file. However the propertie inside system\HTTP\ContentSecurityPolicy.php just accept strings.
__
Steps to Reproduce
Expected Output
The CSP (from Codeigniter\HTTP\ContentSecurityPolicy) object inside the response object (Codeigniter\HTTP\Response) setted as null
Anything else?
$csp->setReportURI('null') or $csp->setReportURI('') do the job. So I can handle it in the model
The text was updated successfully, but these errors were encountered: