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

Unified Diff: Source/core/page/DOMWindowBase64.cpp

Issue 19623002: Make atob() throw an InvalidCharacterError on excess padding characters (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 5 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 | « LayoutTests/fast/dom/Window/atob-btoa-expected.txt ('k') | Source/wtf/text/Base64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/DOMWindowBase64.cpp
diff --git a/Source/core/page/DOMWindowBase64.cpp b/Source/core/page/DOMWindowBase64.cpp
index 736668c68d29d8c5a344421d1aa205a5e68efdd2..7d3252ba2b935162078a5703378344a8d8e6a764 100644
--- a/Source/core/page/DOMWindowBase64.cpp
+++ b/Source/core/page/DOMWindowBase64.cpp
@@ -63,7 +63,7 @@ String atob(void*, const String& encodedString, ExceptionCode& ec)
}
Vector<char> out;
- if (!base64Decode(encodedString, out, Base64FailOnInvalidCharacter)) {
+ if (!base64Decode(encodedString, out, Base64FailOnInvalidCharacter, Base64StrictPaddingValidation)) {
ec = InvalidCharacterError;
return String();
}
« no previous file with comments | « LayoutTests/fast/dom/Window/atob-btoa-expected.txt ('k') | Source/wtf/text/Base64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698