|
From: Nathan C. <na...@us...> - 2001-11-25 23:31:07
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv32602/includes
Modified Files:
bbcode.php functions.php
Log Message:
Fixed bug 478218 -- [ and ] in usernames qith quote= bbcode. Usernames can no longer contain the double-quote character. Also removed a dupe from lang_main file.
Index: bbcode.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/bbcode.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** bbcode.php 2001/10/24 22:52:16 1.14
--- bbcode.php 2001/11/25 23:31:04 1.15
***************
*** 168,172 ****
$text = str_replace("[/quote:$uid]", $bbcode_tpl['quote_close'], $text);
! $text = preg_replace("/\[quote:$uid=(.*?)\]/si", $bbcode_tpl['quote_username_open'], $text);
// [b] and [/b] for bolding text.
--- 168,172 ----
$text = str_replace("[/quote:$uid]", $bbcode_tpl['quote_close'], $text);
! $text = preg_replace("/\[quote:$uid=\"?(.*?)\"?\]/si", $bbcode_tpl['quote_username_open'], $text);
// [b] and [/b] for bolding text.
***************
*** 241,245 ****
$text = bbencode_first_pass_pda($text, $uid, '[quote]', '[/quote]', '', false, '');
! $text = bbencode_first_pass_pda($text, $uid, '/\[quote=(.*?)\]/is', '[/quote]', '', false, '', "[quote:$uid=\\1]");
// [list] and [list=x] for (un)ordered lists.
--- 241,245 ----
$text = bbencode_first_pass_pda($text, $uid, '[quote]', '[/quote]', '', false, '');
! $text = bbencode_first_pass_pda($text, $uid, '/\[quote=(\\\\".*?\\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=\\1]");
// [list] and [list=x] for (un)ordered lists.
***************
*** 277,282 ****
$text = substr($text, 1);
- // Add the uid tag to the start of the string..
- //$text = '[uid=' . $uid . ']' . $text;
return $text;
--- 277,280 ----
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/functions.php,v
retrieving revision 1.83
retrieving revision 1.84
diff -C2 -r1.83 -r1.84
*** functions.php 2001/11/21 16:27:43 1.83
--- functions.php 2001/11/25 23:31:04 1.84
***************
*** 477,480 ****
--- 477,481 ----
//
// Check to see if the username has been taken, or if it is disallowed.
+ // Also checks if it includes the " character, which we don't allow in usernames.
// Used for registering, changing names, and posting anonymously with a username
//
***************
*** 549,552 ****
--- 550,559 ----
}
}
+ }
+
+ // Don't allow " in username.
+ if ( strstr($username, '"') )
+ {
+ return FALSE;
}
|