mirror of
https://github.com/cloudpanel-io/cloudpanel-ce.git
synced 2026-04-05 20:31:58 +02:00
Spaces in bot names not escaped #318
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 @ccMatrix on 11/16/2023
CloudPanel version(s) affected
2.3.2
Description
When adding bots to block to a site an nginx regex is created. If the bot name contains a space like in "evil bot" then the regex will be broken.
How to reproduce
Go to site security tab and add a bot with a space e.g. "test bot".
Then go to vhost and just save it to run the nginx -t command and it will show the erro.
Possible Solution
Escape the space with
\swhen writing it to the nginx configuration on diskAdditional Context
No response