Percent+numbers in a post's content get removed
From either webUI or any other client, if you post something like, say:
AAA%25000BBB
The percent sign and the first 4 digits will get removed, so you'll be posting something like:
AAA0BBB
I imagine node.js is making some sort of parameter replacement when parsing strings, looking to replace %ID with some parameter, like C's printf() or Qt's QString::arg() do.
For some reason, if you post "Blah %25 Blah", only the "25" will disappear, and the % sign will remain.
Apparently if the number following the percent sign is <10, no problem occurs.
This is, I think, the root cause for #1045.
@jankusanagi can you reproduce this on pump.strugee.net? If not I'm inclined to think this was due to some sort of XSS-related bug which is now gone under the new DOMPurify-based XSS scrubber.
I'm not having much luck with pump.strugee.net, but you can easily test this.
Just add this at any point in a post or comment: AAA%25000BBB
And if any character is gone, the bug's still there =)
Crap, sorry - forgot that pump.strugee.net isn't working terribly well due to some disk problems I'm having.
I'll test this when I get the chance.
Executed on Identica and bug occurs. Posted using WebUI. See: https://identi.ca/alpacaherder/note/3kTpjy03Re6uX_zv6haVgw
On Thu, 03 Nov 2016 17:48:25 -0700 JanKusanagi [email protected] wrote:
AAA%25000BBB
@skellat I appreciate you testing this, but results from identi.ca aren't actually useful. It's still running pump.io 0.3.0-alpha.1(!) and even if it were running 1.0.0, it's running on Node 0.10 which uses the old, bad XSS scrubber (where this bug would, frankly, be a WONTFIX).
pump.strugee.net, on the other hand, is running the 2.0.0 beta under Node 4, which will use the new XSS scrubber.
I can't reproduce on pump.strugee.net: https://pump.strugee.net/alex/note/fc4Ov122Ryq4OL9n1NxS7w
If anyone can reproduce this under a modern pump version rubbing under Node 4+, file a new issue.