http mixin: only send auth when strings not empty - #2634
Conversation
aaronkaplan
left a comment
There was a problem hiding this comment.
not quite sure.... I think http auth need both username and pwd
| # auth settings | ||
| if self.http_username is not None: | ||
| # auth settings. username or password must exist (if only one, then this is likely an error, but we should try without auth) and not be an empty string | ||
| if self.http_username or self.http_password: |
There was a problem hiding this comment.
would it work only with a pwd? (no username?)
There was a problem hiding this comment.
Not sure if I understand. What change do you request here?
There was a problem hiding this comment.
Well a pure password in http auth without username is meaningless.. no? How do HTPT servers react?
There was a problem hiding this comment.
Changed to and and added a warning if only one is given
Only set HTTP header 'Authorization' if username or password are set and are not both empty string as they are by default in the Manager fixes certtools#2590
|
Now also added a positive check for the Authorization header. |
|
@aaronkaplan this PR is waiting for your approval |
and add a testcase for the warning
kamil-certat
left a comment
There was a problem hiding this comment.
This is actually a workaround for Manager issue, just btw
The manager bug triggers this, but it could also be a result of a bad manual edit of the config files |
Only set HTTP header 'Authorization' if username or password are set and are not both empty string as they are by default in the Manager
fixes #2590