| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// Unlike the case-sensitive check above, a fallback to the raw strings is notBut as a result, when `case_sensitive == false`, different invalid byte sequences collide and wrongly match.
EXPECT_FALSE(pattern.MatchesPath("/foo%E2bar"));For the reason I explained above, if you add this check it will fail:
`EXPECT_FALSE(pattern.MatchesPath("/foo%E2bar", /*case_sensitive=*/false));`
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (unescaped_pattern.length() == unescaped_test.length() + 2 &&
base::StartsWith(unescaped_pattern, unescaped_test) &&
base::EndsWith(unescaped_pattern, "/*")) {I'll pull this out into a helper template in a followup
// Unlike the case-sensitive check above, a fallback to the raw strings is notBut as a result, when `case_sensitive == false`, different invalid byte sequences collide and wrongly match.
good catch. I had thought about that when writing, and forgot to follow up on it.
Fixed... at the expense of making my head hurt.
For the reason I explained above, if you add this check it will fail:
`EXPECT_FALSE(pattern.MatchesPath("/foo%E2bar", /*case_sensitive=*/false));`
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
if (unescaped_pattern.length() == unescaped_test.length() + 2 &&
base::StartsWith(unescaped_pattern, unescaped_test) &&
base::EndsWith(unescaped_pattern, "/*")) {I'll pull this out into a helper template in a followup
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[Extensions] Robustly handle UTF8 characters in URLPattern::MatchesPath
Add more robust handling for UTF8 matching in URLPattern paths. This
includes:
* Matching UTF8 characters when checking for /* variants
* Matching incomplete / invalid UTF8 characters
* Matching UTF8 characters in both case-sensitive and case-
insensitive variants (instead of just case-insensitive)
Add various unit tests for the above.
Among other things, this fixes utf8 paths for web-accessible resources.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |