question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

URI malformed error during base64 encoding

See original GitHub issue
var foo = '\ud801\ud804-';

when encodeUriComponent

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
sanex3339commented, Sep 30, 2020

Fixed in 2.4.2

1reaction
msheakoskicommented, Sep 29, 2020

Here is how to reproduce:

  1. Visit https://obfuscator.io
  2. Use the following code for the input: "12😃45"
  3. Change String Array Threshold to: 1
  4. Change String Array Encoding to: Base64
  5. Enable: Split Strings
  6. Change Split Strings Chunk Length to: 3
  7. Click the Obfuscate button
  8. Output should be: URIError: URI malformed

It looks like the combination of “Split Strings Chunk Length” and “Base64” is not correctly handling multibyte characters if they occur on a chunk boundary. 😃 is composed of 2 unicode sequences, \uD83D and \uDE03. With a chunk length of 3, this particular string ends up being split into 12\uD83D and \uDE0345

Read more comments on GitHub >

github_iconTop Results From Across the Web

URIError: malformed URI sequence - MDN Web Docs - Mozilla
The JavaScript exception "malformed URI sequence" occurs when URI encoding or decoding wasn't successful.
Read more >
JavaScript - Encode characters and URI malformed error
Eventually there was a bug on my server side. I tried to decode the '%' sign. Solved it by the following: On the...
Read more >
Repair Base64 | Tools
Quite often, users cannot decode Base64, because they got a malformed or invalid string. For example, this can happen if the source outputs...
Read more >
How to Fix Uncaught URIError: URI malformed Errors in JS
In order to fix "Uncaught URIError: URI malformed" errors in your code, you need to ensure that you are passing valid characters to...
Read more >
Base64 Encoding of "malformed" - Online
Encode malformed to Base64 format with various advanced options. Our site has an easy to use online tool to convert your data.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found