Enhance documentation for insecure-passwords and "invald" characters

Hi community,

for some service, we are still using “basic auth”. As we noticed heavy CPU usage due to the used encryption method, we chose to switch that to “insecure-passwords”. But then, the password of a user did not work anymore.

This is caused by the password containing the “#” character in between. haproxy seems to treat this as a start of a comment at the end of a line while parsing the config file. So in that special case, the “valid” password was the string until the (first?) “#” character.

It would be good to either add a small hint to the “user” documentation or - if possible - to adjust the parsing (which could then allow to also accept “#” characters within passwords while using “insecure-password” option).

Thanks.

Robert

There is an entire section about this in the docs, see 2.2. Quoting and escaping.

Either escape the char or quote it with single quotes:

very\#secret\#pw
'very#secret#pw'

Single quoting all the insecure-password examples in the docs would probably be beneficial, I will send a patch for this.

:man_facepalming: Thank you very much for banging my head into this section. I’m currently dancing on too many parties that I did not “see” this.

Nothing more to be done. Topic closed.

1 Like

Nonetheless I have adjusted the doc examples and added a note: