Skip to content
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

CoverPage: Don't use StyleWithNonce for cli interactions #228

Closed
wants to merge 1 commit into from

Conversation

yhabteab
Copy link
Member

Before:

PHP Fatal error:  Uncaught Error: Call to undefined method Icinga\Application\Cli::getRequest() in /icingaweb2/library/Icinga/Web/Window.php:114
Stack trace:
#0 /icingaweb2/library/Icinga/Util/Csp.php(90): Icinga\Web\Window::getInstance()
#1 /icingaweb2/library/Icinga/Util/Csp.php(78): Icinga\Util\Csp::getInstance()
#2 /usr/local/src/ipl-web/src/Compat/StyleWithNonce.php(19): Icinga\Util\Csp::getStyleNonce()
#3 /usr/local/src/ipl-web/src/Style.php(105): ipl\Web\Compat\StyleWithNonce->getNonce()

@yhabteab yhabteab added the bug Something isn't working label Feb 12, 2024
@yhabteab yhabteab added this to the 1.0.2 milestone Feb 12, 2024
@cla-bot cla-bot bot added the cla/signed label Feb 12, 2024
@nilmerg
Copy link
Member

nilmerg commented Feb 13, 2024

I'd rather make StyleWithNonce not using a nonce while not in Web context. What do you think?

@yhabteab
Copy link
Member Author

I'd rather make StyleWithNonce not using a nonce while not in Web context. What do you think?

That would be even better, but I didn't want to add checks like isWeb() in ipl-web.

@nilmerg
Copy link
Member

nilmerg commented Feb 13, 2024

StyleWithNonce is a compat class, where such checks are legitimate.

@yhabteab yhabteab deleted the fix-cli-csp branch April 9, 2024 07:18
@nilmerg nilmerg removed this from the 1.0.2 milestone May 8, 2024
@nilmerg nilmerg removed the bug Something isn't working label May 8, 2024
@nilmerg nilmerg removed their request for review May 8, 2024 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants