JoeDog / siege

Siege is an http load tester and benchmarking utility
GNU General Public License v3.0
5.97k stars 385 forks source link

Parsing Basic Auth from config file fails when password has a pound sign # in it. #195

Closed cathelijne closed 3 years ago

cathelijne commented 3 years ago

This is an exact copy of #194 that I submitted with the wrong username:

I have something like this in my configuration file:

login = user:pass:realm
login = user2@some.domain:password_with_#_in_it:realm 2

Siege -C output:

CURRENT  SIEGE  CONFIGURATION
Mozilla/5.0 (pc-x86_64-linux-gnu) Siege/4.0.9
Edit the resource file to change the settings.
----------------------------------------------
version:                        4.0.9
      [removed for clarity]
www auth:                       credentials:  user:pass:realm
credentials:  user2@some.domain:password_with_:any

Whatever I try (quoting the whole string, quoting only the password, escaping, urlencoding, trying to put the pass in a var and using that as suggested for the url file in this issue: https://github.com/JoeDog/siege/issues/189), I cannot make siege understand that the line shouldn't be cut off after the pound sign. Is this just a feature of the parser, or have I overlooked something?

Including Jeffs answer to #194

This looks right: @.***:passwordwith#_in_it:realm 2 However, I think you encountered a bug. It's treating the password like a comment. I'll try to provide a fix soon.

JoeDog commented 3 years ago

This issue was fixed with version 4.1.0 which is in the repo.