Commit 31fef7e
bpo-46756: Fix authorization check in urllib.request (pythonGH-31353) (pythonGH-31573)
Fix a bug in urllib.request.HTTPPasswordMgr.find_user_password() and
urllib.request.HTTPPasswordMgrWithPriorAuth.is_authenticated() which
allowed to bypass authorization. For example, access to URI "example.org/foobar"
was allowed if the user was authorized for URI "example.org/foo".
(cherry picked from commit e2e7256)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>1 parent 15d7594 commit 31fef7e
File tree
3 files changed
+30
-8
lines changed- Lib
- test
- urllib
- Misc/NEWS.d/next/Library
3 files changed
+30
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
164 | 163 | | |
165 | 164 | | |
166 | 165 | | |
| |||
169 | 168 | | |
170 | 169 | | |
171 | 170 | | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
176 | 175 | | |
177 | 176 | | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
178 | 194 | | |
179 | 195 | | |
180 | 196 | | |
| |||
1642 | 1658 | | |
1643 | 1659 | | |
1644 | 1660 | | |
1645 | | - | |
1646 | | - | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
1647 | 1664 | | |
1648 | 1665 | | |
1649 | 1666 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
890 | 890 | | |
891 | 891 | | |
892 | 892 | | |
893 | | - | |
894 | | - | |
895 | | - | |
896 | | - | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
897 | 897 | | |
898 | 898 | | |
899 | 899 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
0 commit comments