Comments (3)
@agenbite great find, thank you for reporting this issue!
It looks like I did not account for handling the full set UTF-8 characters. I've tested a fix to this, and I should be able to update the scripts later today, after some testing.
Some details, if you are (or anyone else is) interested: the markers in the URL (i.e., **A
) specify how many bytes (and not characters or list entries) should be replaced from the base64-encoded replacement string (w60
). In this particular case, **A
equals 2
, and while the replacement string í
has length 1, it takes 2 bytes to encode í
with UTF-8 (UTF-8 encodes to 1-4 bytes).
The bug, then, was that I coded the URL markers to be the length of the string replacement and not the number of bytes, which led to popping from an empty list. The fix (at the moment) is build the replacement character mapping using the number of bytes by popping the character, calculating the number of bytes it is encoded to in UTF-8, and increment a counter by its size in bytes rather than string length.
from proofpoint-url-decoder.
It works beautifully, @cardi! Thank you so much for the quick response!!
from proofpoint-url-decoder.
@agenbite just pushed a fix. please give it a try and feel free to reopen this issue if the fix doesn't work. thanks again for reporting this!
from proofpoint-url-decoder.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from proofpoint-url-decoder.