Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
BM 6 - Deploy Configuration file with a lot of special characters
-
Hello
I am using BM to deploy HAProxy config and I need some help to add the following rules in a configuration file:
# ACL LOG4J https://www.haproxy.com/blog/december-2021-log4shell-mitigation/ option http-buffer-request acl log4shell url,url_dec -m reg \${[^}]*\${ acl log4shell url,url_dec -m reg \${jndi:(?:ldaps?|iiop|dns|rmi):// acl log4shell url,url_dec -i -m reg \${[\w${}\-:]*j[\w${}\-:]*n[\w${}\-:]*d[\w${}\-:]*i[\w${}\-:]*:.*} acl log4shell req.hdrs -m reg \${[^}]*\${ acl log4shell req.hdrs -m reg \${jndi:(?:ldaps?|iiop|dns|rmi):// acl log4shell req.hdrs -i -m reg \${[\w${}\-:]*j[\w${}\-:]*n[\w${}\-:]*d[\w${}\-:]*i[\w${}\-:]*:.*} acl log4shell_form req.body,url_dec -m reg \${[^}]*\${ acl log4shell_form req.body,url_dec -m reg \${jndi:(?:ldaps?|iiop|dns|rmi):// acl log4shell_form req.body,url_dec -i -m reg \${[\w${}\-:]*j[\w${}\-:]*n[\w${}\-:]*d[\w${}\-:]*i[\w${}\-:]*:.*} http-request deny if log4shell http-request deny if { req.fhdr(content-type) -m str application/x-www-form-urlencoded } log4shell_formSpecial characters break the deployment
I tried to add ` in front of $ unsuccessfullyBest regards
Philippe C. -
Hi @philippe-camelio_3885,
In my experience you should only need to add ` in front of all the $ and that should work. Can you give this version a try?
# ACL LOG4J https://www.haproxy.com/blog/december-2021-log4shell-mitigation/ option http-buffer-request acl log4shell url,url_dec -m reg \`${[^}]*\`${ acl log4shell url,url_dec -m reg \`${jndi:(?:ldaps?|iiop|dns|rmi):// acl log4shell url,url_dec -i -m reg \`${[\w`${}\-:]*j[\w`${}\-:]*n[\w`${}\-:]*d[\w`${}\-:]*i[\w`${}\-:]*:.*} acl log4shell req.hdrs -m reg \`${[^}]*\`${ acl log4shell req.hdrs -m reg \`${jndi:(?:ldaps?|iiop|dns|rmi):// acl log4shell req.hdrs -i -m reg \`${[\w`${}\-:]*j[\w`${}\-:]*n[\w`${}\-:]*d[\w`${}\-:]*i[\w`${}\-:]*:.*} acl log4shell_form req.body,url_dec -m reg \`${[^}]*\`${ acl log4shell_form req.body,url_dec -m reg \`${jndi:(?:ldaps?|iiop|dns|rmi):// acl log4shell_form req.body,url_dec -i -m reg \`${[\w`${}\-:]*j[\w`${}\-:]*n[\w`${}\-:]*d[\w`${}\-:]*i[\w`${}\-:]*:.*} http-request deny if log4shell http-request deny if { req.fhdr(content-type) -m str application/x-www-form-urlencoded } log4shell_formThanks,
Rich -
Thanks you Rich
it is working !.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login