commit | 295d736c331732b65e5559891d18df04ac904618 | [log] [tgz] |
---|---|---|
author | Vaclav Brozek <[email protected]> | Tue Dec 15 10:09:56 2020 |
committer | Chromium LUCI CQ <[email protected]> | Tue Dec 15 10:09:56 2020 |
tree | 53ca094ddb90a7f9d00306fa3800580a1be10da3 | |
parent | fc6ed3616e0dd34d832e63b713cde74803182d4a [diff] |
Reset last_invalid_percent_index if output is invalidated When a GURL's path is canonicalized, the code is trying to handle nested escape sequences. It keeps the index of the last seemingly invalid "%" in a variable called last_invalid_percent_index, so that ssequences like "%%41B" can be transformed to "%AB". However, it can happen, that an already output part of the path is invalidated and cut off, such as in "abc/../", which is equivalent to "". The bug in the current code is that last_invalid_percent_index is not reset if the part of the output which it points to gets invalidated. This resulted in the mysterious inserting of the hex code of "%" in the middle of the escape sequence of ">" when canonicalizing the path "5%/../>%41". This CL simply makes sure that last_invalid_percent_index is reset whenever it points beyond the end of the current output. Bug: 1080890 Change-Id: I04a5246ecbb66b645d796ec88babd74383d18661 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2587060 Auto-Submit: Vaclav Brozek <[email protected]> Reviewed-by: Daniel Cheng <[email protected]> Commit-Queue: Daniel Cheng <[email protected]> Cr-Commit-Position: refs/heads/master@{#837031}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.