Commit a1a69e1
committed
Guard against wide-domain checks
Previously, we would parse the malicious URL example with an authority
of 'user:[email protected]\\test.corp.google.com:8080' but we would not
parse that into its components because it had invalid characters. So
accessing the `host` attribute would result in `None`. That said,
someone might still have used the `authority` attribute and been misled.
To avoid misuse by developers, let's parse this similarly to the fix in
the blog post.
See also:
- https://bugs.xdavidhu.me/google/2020/03/08/the-unexpected-google-wide-domain-check-bypass/1 parent 9a87fd6 commit a1a69e1
2 files changed
+13
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
0 commit comments