Skip to content

Commit 72fc5de

Browse files
committed
fixed problems with usernames using html special chars, added GMT + 13 to english lang_main (yes, again. ;)), paul will slap me again... i see the trout coming, but this var has to be added.
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3616 89ea8834-ac86-4346-8a33-228a782c2dd0
1 parent 3bb8fff commit 72fc5de

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

phpBB/admin/admin_users.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@
216216
message_die(GENERAL_MESSAGE, $message);
217217
}
218218

219-
$username = ( !empty($HTTP_POST_VARS['username']) ) ? trim(strip_tags( $HTTP_POST_VARS['username'] ) ) : '';
219+
$username = ( !empty($HTTP_POST_VARS['username']) ) ? trim(strip_tags(htmlspecialchars($HTTP_POST_VARS['username']))) : '';
220220
$email = ( !empty($HTTP_POST_VARS['email']) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS['email'] ) )) : '';
221221

222222
$password = ( !empty($HTTP_POST_VARS['password']) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS['password'] ) )) : '';
@@ -736,7 +736,7 @@
736736
// Now parse and display it as a template
737737
//
738738
$user_id = $this_userdata['user_id'];
739-
$username = htmlspecialchars($this_userdata['username']);
739+
$username = $this_userdata['username'];
740740
$email = $this_userdata['user_email'];
741741
$password = '';
742742
$password_confirm = '';

phpBB/groupcp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$
471471

472472
if ( isset($HTTP_POST_VARS['add']) )
473473
{
474-
$username = ( isset($HTTP_POST_VARS['username']) ) ? $HTTP_POST_VARS['username'] : "";
474+
$username = ( isset($HTTP_POST_VARS['username']) ) ? htmlspecialchars($HTTP_POST_VARS['username']) : '';
475475

476476
$sql = "SELECT user_id, user_email, user_lang, user_level
477477
FROM " . USERS_TABLE . "

phpBB/language/lang_english/lang_main.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,7 @@
923923
$lang['10'] = 'GMT + 10 Hours';
924924
$lang['11'] = 'GMT + 11 Hours';
925925
$lang['12'] = 'GMT + 12 Hours';
926+
$lang['13'] = 'GMT + 13 Hours';
926927

927928
// These are displayed in the timezone select box
928929
$lang['tz']['-12'] = 'GMT - 12 Hours';

phpBB/login.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
{
5555
if( ( isset($HTTP_POST_VARS['login']) || isset($HTTP_GET_VARS['login']) ) && !$userdata['session_logged_in'] )
5656
{
57-
$username = isset($HTTP_POST_VARS['username']) ? $HTTP_POST_VARS['username'] : '';
57+
$username = isset($HTTP_POST_VARS['username']) ? trim(htmlspecialchars($HTTP_POST_VARS['username'])) : '';
5858
$password = isset($HTTP_POST_VARS['password']) ? $HTTP_POST_VARS['password'] : '';
5959

6060
$sql = "SELECT user_id, username, user_password, user_active, user_level

0 commit comments

Comments
 (0)