diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-11-18 15:36:56 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2001-11-18 15:36:56 +0000 |
commit | 9aa55fb94c5fdb364d1f19bb38a6027ef62a81cb (patch) | |
tree | b0b02e314b5ffd34d016d3c6ef7e356976d0134e /phpBB/profile.php | |
parent | a3014676ca35f58c5f3447136f1685688d80ba6a (diff) | |
download | forums-9aa55fb94c5fdb364d1f19bb38a6027ef62a81cb.tar forums-9aa55fb94c5fdb364d1f19bb38a6027ef62a81cb.tar.gz forums-9aa55fb94c5fdb364d1f19bb38a6027ef62a81cb.tar.bz2 forums-9aa55fb94c5fdb364d1f19bb38a6027ef62a81cb.tar.xz forums-9aa55fb94c5fdb364d1f19bb38a6027ef62a81cb.zip |
Slightly fairer sig length check, removes =.*? from BBCode and HTML tags
git-svn-id: file:///svn/phpbb/trunk@1360 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/profile.php')
-rw-r--r-- | phpBB/profile.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/phpBB/profile.php b/phpBB/profile.php index d715d7d9b3..828c485960 100644 --- a/phpBB/profile.php +++ b/phpBB/profile.php @@ -631,7 +631,16 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) if( $signature != "" ) { - if( strlen($signature) > $board_config['max_sig_chars'] ) + $sig_length_check = preg_replace("/(\[.*?)(=.*?)\]/is", "\\1]", $signature); + if( $allowhtml ) + { + $sig_length_check = preg_replace("/(<.*?)(=.*?)([ \/]?" . ">)/is", "\\1\\3", $signature); + } + + $signature_bbcode_uid = ( $allowbbcode ) ? make_bbcode_uid() : ""; + $signature = prepare_message($signature, $allowhtml, $allowbbcode, $allowsmilies, $signature_bbcode_uid); + + if( strlen($sig_length_check) > $board_config['max_sig_chars'] ) { $error = TRUE; if( isset($error_msg) ) @@ -640,11 +649,6 @@ if( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) ) } $error_msg .= $lang['Signature_too_long']; } - else - { - $signature_bbcode_uid = ( $allowbbcode ) ? make_bbcode_uid() : ""; - $signature = prepare_message($signature, $allowhtml, $allowbbcode, $allowsmilies, $signature_bbcode_uid); - } } if( $mode == "register" ) |