diff --git a/phpBB/admin/admin_groups.php b/phpBB/admin/admin_groups.php
index 05742221c1..0e99d7d79f 100644
--- a/phpBB/admin/admin_groups.php
+++ b/phpBB/admin/admin_groups.php
@@ -43,7 +43,7 @@ if ( isset($HTTP_POST_VARS[POST_GROUPS_URL]) || isset($HTTP_GET_VARS[POST_GROUPS
}
else
{
- $group_id = '';
+ $group_id = 0;
}
if ( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
diff --git a/phpBB/admin/admin_ug_auth.php b/phpBB/admin/admin_ug_auth.php
index 8e53331a35..edcd4a4f2e 100644
--- a/phpBB/admin/admin_ug_auth.php
+++ b/phpBB/admin/admin_ug_auth.php
@@ -54,6 +54,9 @@ while( list($var, $param) = @each($params) )
}
}
+$user_id = intval($user_id);
+$group_id = intval($group_id);
+
//
// Start program - define vars
//
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 68242458de..3ac544727c 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -112,6 +112,8 @@ p,ul,td {font-size:10pt;}
Fixed timezone display
Fixed wrong display of author quote tag within profile - Cl1mh4224rd
Delete user sessions after deactivating the username to prevent him navigating the forum (if logged in)
+Added mail header X-MimeOLE to the emailer class
+Prevent registration if user is logged in or user trying to register a second time
1.ii. Changes since 2.0.3
diff --git a/phpBB/includes/emailer.php b/phpBB/includes/emailer.php
index 1b2a8b8a95..d6e94d52c3 100755
--- a/phpBB/includes/emailer.php
+++ b/phpBB/includes/emailer.php
@@ -203,7 +203,7 @@ class emailer
}
// Build header
- $this->extra_headers = (($this->replyto != '') ? "Reply-to: <$this->replyto>\n" : '') . (($this->from != '') ? "From: <$this->from>\n" : "From: <" . $board_config['board_email'] . ">\n") . "Return-Path: <" . $board_config['board_email'] . ">\nMessage-ID: <" . md5(uniqid(time())) . "@" . $board_config['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . gmdate('D, d M Y H:i:s Z', time()) . "\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\n" . (($cc != '') ? "Cc:$cc\n" : '') . (($bcc != '') ? "Bcc:$bcc\n" : '') . trim($this->extra_headers);
+ $this->extra_headers = (($this->replyto != '') ? "Reply-to: <$this->replyto>\n" : '') . (($this->from != '') ? "From: <$this->from>\n" : "From: <" . $board_config['board_email'] . ">\n") . "Return-Path: <" . $board_config['board_email'] . ">\nMessage-ID: <" . md5(uniqid(time())) . "@" . $board_config['server_name'] . ">\nMIME-Version: 1.0\nContent-type: text/plain; charset=" . $this->encoding . "\nContent-transfer-encoding: 8bit\nDate: " . gmdate('D, d M Y H:i:s Z', time()) . "\nX-Priority: 3\nX-MSMail-Priority: Normal\nX-Mailer: PHP\nX-MimeOLE: Produced By phpBB2\n" . (($cc != '') ? "Cc:$cc\n" : '') . (($bcc != '') ? "Bcc:$bcc\n" : '') . trim($this->extra_headers);
$to = ($to == '') ? "" : $to;
diff --git a/phpBB/includes/usercp_register.php b/phpBB/includes/usercp_register.php
index b477efa965..9ad3df588b 100644
--- a/phpBB/includes/usercp_register.php
+++ b/phpBB/includes/usercp_register.php
@@ -207,12 +207,13 @@ if (
}
}
}
+
//
// Let's make sure the user isn't logged in while registering,
// and ensure that they were trying to register a second time
// (Prevents double registrations)
//
-if ( $userdata['session_logged_in'] && $mode == 'register' && $username == $userdata['username'])
+if ($mode == 'register' && ($userdata['session_logged_in'] || $username == $userdata['username']))
{
message_die(GENERAL_MESSAGE, $lang['Username_taken'], '', __LINE__, __FILE__);
}
diff --git a/phpBB/install/install.php b/phpBB/install/install.php
index 9d11119731..8cefe04c92 100644
--- a/phpBB/install/install.php
+++ b/phpBB/install/install.php
@@ -463,7 +463,7 @@ if ($upgrade == 1)
if (!empty($HTTP_POST_VARS['send_file']) && $HTTP_POST_VARS['send_file'] == 1 && empty($HTTP_POST_VARS['upgrade_now']))
{
header('Content-Type: text/x-delimtext; name="config.' . $phpEx . '"');
- header('Content-disposition: attachment; filename=config.' . $phpEx . '"');
+ header('Content-disposition: attachment; filename="config.' . $phpEx . '"');
// We need to stripslashes no matter what the setting of magic_quotes_gpc is
// because we add slashes at the top if its off, and they are added automaticlly