Commit 37f4199
Open Source Contributor
Fix HTTPDigestAuth non-latin credentials encoding
When HTTPDigestAuth credentials are passed as bytes (e.g. encoded UTF-8),
they were being used directly in the digest header without decoding,
resulting in headers like Digest username="b'Ond\xc5\x99ej'" instead
of the properly decoded username.
This fix decodes bytes username/password to strings before using them
in the digest A1 computation and the username header field.
Fixes #61021 parent 04d7505 commit 37f4199
1 file changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
222 | 231 | | |
223 | 232 | | |
224 | 233 | | |
| |||
250 | 259 | | |
251 | 260 | | |
252 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
253 | 266 | | |
254 | | - | |
| 267 | + | |
255 | 268 | | |
256 | 269 | | |
257 | 270 | | |
| |||
0 commit comments