|
From: Paul S. O. <ps...@us...> - 2001-11-18 16:08:14
|
Update of /cvsroot/phpbb/phpBB2
In directory usw-pr-cvs1:/tmp/cvs-serv9358
Modified Files:
profile.php
Log Message:
Slightly fairer sig length check, removes =.*? from BBCode and HTML tags - version 2
Index: profile.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/profile.php,v
retrieving revision 1.134
retrieving revision 1.135
diff -C2 -r1.134 -r1.135
*** profile.php 2001/11/18 15:36:56 1.134
--- profile.php 2001/11/18 16:08:11 1.135
***************
*** 489,493 ****
$occupation = (!empty($HTTP_POST_VARS['occupation'])) ? trim(strip_tags($HTTP_POST_VARS['occupation'])) : "";
$interests = (!empty($HTTP_POST_VARS['interests'])) ? trim(strip_tags($HTTP_POST_VARS['interests'])) : "";
! $signature = (!empty($HTTP_POST_VARS['signature'])) ? trim(strip_tags(str_replace("<br />", "\n", $HTTP_POST_VARS['signature']))) : "";
// Run some validation on the optional fields. These are pass-by-ref, so they'll be changed to
--- 489,493 ----
$occupation = (!empty($HTTP_POST_VARS['occupation'])) ? trim(strip_tags($HTTP_POST_VARS['occupation'])) : "";
$interests = (!empty($HTTP_POST_VARS['interests'])) ? trim(strip_tags($HTTP_POST_VARS['interests'])) : "";
! $signature = (!empty($HTTP_POST_VARS['signature'])) ? trim(str_replace("<br />", "\n", $HTTP_POST_VARS['signature'])) : "";
// Run some validation on the optional fields. These are pass-by-ref, so they'll be changed to
***************
*** 632,639 ****
if( $signature != "" )
{
! $sig_length_check = preg_replace("/(\[.*?)(=.*?)\]/is", "\\1]", $signature);
if( $allowhtml )
{
! $sig_length_check = preg_replace("/(<.*?)(=.*?)([ \/]?" . ">)/is", "\\1\\3", $signature);
}
--- 632,639 ----
if( $signature != "" )
{
! $sig_length_check = preg_replace("/(\[.*?)(=.*?)\]/is", "\\1]", stripslashes($signature));
if( $allowhtml )
{
! $sig_length_check = preg_replace("/(\<.*?)(=.*?)( .*?=.*?)?([ \/]?\>)/is", "\\1\\3\\4", $sig_length_check);
}
|