News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

[4364] 2.0 RC3 - urls that contain [brackets] are truncated

Started by rbeuker, May 13, 2010, 08:26:49 AM

Previous topic - Next topic

rbeuker


rbeuker

I'm just wondering: has this been solved now? I cannot find any 4364 ticket in the bugtracker ;)

By the way, the issue has been also reported here: http://www.simplemachines.org/community/index.php?topic=401021.0

Arantor

It is in there, unsolved, but it may be deferred to 2.1 if it requires rewriting the bbcode parser, which seemslikely.

rbeuker


spiros


Arantor

[url]http://example.com/index.php?var[]=value[/url]

Is it just me that sees the problem here? The [ character is being used in both the tag and the tag's contents. The problem with this is you'd have to test every URL tag for unmatched [ tags.

And before anyone says 'regular expression', that's not a viable answer either; SMF did not originally use parse_bbc the way it exists now, it originally used regular expressions. It's been done to create posts that actually force the parser to take ridiculous amounts of time to parse. Rack up a bunch of topics with those in and you have a miniature denial of service attack. It's called a REDoS when that happens.

The parser works now by finding the next [ in it once you're inside a tag, fixing that is... difficult. I have one idea, though, that might work without, need to explore it a bit further.

Arantor


Advertisement: