Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1319)

Unified Diff: net/base/escape.h

Issue 1180393003: Added characters that look like padlocks to URL unescaping blacklist. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename NON_DISPLAY_CHARS to SPOOFING_AND_CONTROL_CHARS. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/data_url.cc ('k') | net/base/escape.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/escape.h
diff --git a/net/base/escape.h b/net/base/escape.h
index c4abe1469a86de71cd4fe3dd5a7a32ed38b3a5ab..9c500b098965eb0bb9cac57b4e8fba44b64d1ae1 100644
--- a/net/base/escape.h
+++ b/net/base/escape.h
@@ -92,13 +92,14 @@ class UnescapeRule {
// interpreting as a URL and want to do as much unescaping as possible.
URL_SPECIAL_CHARS = 4,
- // Unescapes control characters such as %01. This INCLUDES NULLs. This is
- // used for rare cases such as data: URL decoding where the result is binary
- // data. This flag also unescapes BiDi control characters.
+ // Unescapes characters that can be used in spoofing attempts (such as LOCK)
+ // and control characters (such as BiDi control characters and %01). This
+ // INCLUDES NULLs. This is used for rare cases such as data: URL decoding
+ // where the result is binary data.
//
- // DO NOT use CONTROL_CHARS if the URL is going to be displayed in the UI
- // for security reasons.
- CONTROL_CHARS = 8,
+ // DO NOT use SPOOFING_AND_CONTROL_CHARS if the URL is going to be displayed
+ // in the UI for security reasons.
+ SPOOFING_AND_CONTROL_CHARS = 8,
// URL queries use "+" for space. This flag controls that replacement.
REPLACE_PLUS_WITH_SPACE = 16,
« no previous file with comments | « net/base/data_url.cc ('k') | net/base/escape.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698