News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

REPORT: Potentially "Fatal Flaw" in SMF's bbcode parser

Started by dougiefresh, July 31, 2015, 09:12:39 AM

Previous topic - Next topic

dougiefresh

#41
Quote from: Joshua Dickerson on August 22, 2015, 04:42:21 AM
I don't have an SMF install right now, but should this line us " instead of "?
$tpos += ($pos1 = strpos(substr($message, $tpos), '"'));
Hmmmm.....  That's a good question.  Let me test and see....

Quote from: dcmouser on August 31, 2015, 11:56:23 PM
Great work, dougie.
Thanks....

dougiefresh

UPDATE: The nightly version of SMF 2.1 Beta 2 has addressed this issue so that memory issues as described in the first post cannot crash the forum in this way....

Joshua Dickerson

In testing of your function, it takes about ~18% more time for the most common usages (<4 parameters). With more parameters, your implementation might be faster but there's no default BBC that has 4+ parameters and I doubt there are many mod BBC that have that. So, I think the best implementation is the one that is currently used.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Joshua Dickerson

In testing, I did find a bug though.

Test

<img src="http://avatars.simplemachinesweb.com/smf/avatar_23_1337883444.png" alt="Test height=100" width="100" class="bbc_img resized" style="cursor: pointer;">
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Advertisement: