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

Unified Diff: Source/core/frame/Location.cpp

Issue 874393006: Clear username and password from location.href when basic HTTP (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add LayoutTests. Created 5 years, 11 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
Index: Source/core/frame/Location.cpp
diff --git a/Source/core/frame/Location.cpp b/Source/core/frame/Location.cpp
index 45b0ea5cdeecaa4238c66d32d6aa8a789c0cae5b..b93a6cb1dbfed496691fcb7a36a41feb61732111 100644
--- a/Source/core/frame/Location.cpp
+++ b/Source/core/frame/Location.cpp
@@ -68,7 +68,7 @@ String Location::href() const
if (!m_frame)
return String();
- return url().string();
+ return url().strippedForUseAsHref();
}
String Location::protocol() const
« no previous file with comments | « LayoutTests/http/tests/security/location-href-clears-username-password-expected.txt ('k') | Source/platform/weborigin/KURL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698