Regular Expression For Profile Fields
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #4
RE: Regular Expression For Profile Fields
Nice and logical - should be in stock Tongue

BTW, you might want to strip null chars when saving the expression, that is, replace

PHP Code:
$mn_pfaddsetting['mn_pfregex'] = $GLOBALS['db']->escape_string($GLOBALS['mybb']->input['mn_pfregex']);

with

PHP Code:
$mn_pfaddsetting['mn_pfregex'] = $GLOBALS['db']->escape_string(str_replace("\0", '', $GLOBALS['mybb']->input['mn_pfregex']));


IMO you shouldn't need to do this - blame PHP for that.  Reason being that it's possible to artificially terminate the expression early, although, really, it's not much of an issue since only admins can exploit it.


My Blog
01-31-2012 04:55 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Regular Expression For Profile Fields - ZiNgA BuRgA - 01-31-2012 04:55 PM

 Standard Tools
Forum Jump: