mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
AK: URL should urldecode data: URL payloads
Otherwise we can end up with percent-encoded nonsense in base64 data which does not decode correctly.
This commit is contained in:
parent
2622ead6c6
commit
ff6de8a169
Notes:
sideshowbarker
2024-07-19 05:43:31 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/ff6de8a1697
1 changed files with 2 additions and 1 deletions
|
@ -27,6 +27,7 @@
|
|||
#include <AK/LexicalPath.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <AK/URL.h>
|
||||
#include <AK/URLParser.h>
|
||||
|
||||
namespace AK {
|
||||
|
||||
|
@ -238,7 +239,7 @@ bool URL::parse(const StringView& string)
|
|||
if (state == State::InFragment)
|
||||
m_fragment = String::copy(buffer);
|
||||
if (state == State::InDataPayload)
|
||||
m_data_payload = String::copy(buffer);
|
||||
m_data_payload = urldecode(String::copy(buffer));
|
||||
if (m_query.is_null())
|
||||
m_query = "";
|
||||
if (m_fragment.is_null())
|
||||
|
|
Loading…
Reference in a new issue