mirror of
https://github.com/cloudpanel-io/cloudpanel-ce.git
synced 2026-04-05 20:31:58 +02:00
Using " in the additional directives configuration breaks CloudPanel #519
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @AjdinDev on 7/12/2022
CloudPanel version(s) affected
2.0.2
Description
Using " quotes in the additional configuration directives field will break everything due to parsing issues in the config. More explanation below.
How to reproduce
I saved a php.ini directive between "" in the "Additional Configuration Directives" field and it didn't give any errors. I did notice that the directive wasn't working properly. A while later, I restarted the instance and while the server was up, cloudpanel or the websites weren't. After trying to manually start nginx it failed with a configuration error which looked like following:

The content of said nginx config:

It's not quite liking the session save path input due to the quotes.
After manually removing that from the nginx config and rebooting nginx, cloudpanel and the website were reachable again.
This is the additional directive configuration I used:

Possible Solution
I would implement better checks in the input field, perhaps replacing all " with '.
Additional Context
No response