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. #194

Closed ms-accounts-x-arvesta closed 3 years ago

ms-accounts-x-arvesta commented 3 years ago

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?

JoeDog commented 3 years ago

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.

On Fri, Jun 25, 2021 at 4:07 PM ms-accounts-x-arvesta < @.***> wrote:

I have something like this in my configuration file:

login = user:pass:realm login = @.***:passwordwith#_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: @.***:passwordwith: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: #189 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?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JoeDog/siege/issues/194, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJRHZUP5UY2FT3CUQLVMK3TUTOYRANCNFSM47KPVDVA .

-- Jeff Fulmer 1-717-799-8226 https://www.joedog.org/ He codes

ms-accounts-x-arvesta commented 3 years ago

Submitted under the wrong username, I was asked to delete/close this.