fix for wrong using of +
fix for wrong using of +

--- a/bridges/SMF/get_session_vars.php
+++ b/bridges/SMF/get_session_vars.php
@@ -5,7 +5,7 @@
 

 if (!empty($_COOKIE[$sitekey."_useruid"])  && !isset($_SESSION[$sitekey."_useruid"])) {

 	$userdata = dbassoc(dbquery("SELECT "._UIDFIELD." as uid, "._PENNAMEFIELD." as penname, "._EMAILFIELD." as email, "._PASSWORDFIELD." as password, ap.* FROM "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_authorprefs as ap ON ap.uid = "._UIDFIELD." WHERE "._UIDFIELD." = '".$_COOKIE[$sitekey."_useruid"]."'"));

-	if($userdata && $userdata['level'] != -1 && $_COOKIE[$sitekey.'_pwd'] == md5($userdata['email']+$userdata['password'])) {

+	if($userdata && $userdata['level'] != -1 && $_COOKIE[$sitekey.'_pwd'] == md5($userdata['email'] . $userdata['password'])) {

 		define("USERUID", $userdata['uid']);

 		define("USERPENNAME", $userdata['penname']);

 		if(!isset($_SESSION[$sitekey."_skin"]) && !empty($userdata['userskin'])) $siteskin = $userdata['userskin'];


--- a/bridges/default/editbio.php
+++ b/bridges/default/editbio.php
@@ -155,8 +155,8 @@
 			$result = dbquery("UPDATE "._AUTHORTABLE." SET realname='".descript(strip_tags(escapestring($_POST['realname'])), $allowed_tags)."', email='$email', bio='".descript(strip_tags(escapestring($_POST['bio']), $allowed_tags))."', image='".($imageupload && !empty($_POST['image']) ? escapestring($_POST['image']) : "")."' WHERE uid = '$uid'");

 			if($result) { // only if the info actually got updated.

 				if($oldinfo['email'] != $email) { // Need to reset the session and cookies in this case.

-					$_SESSION[SITEKEY."_salt"] = md5($email+$encryptedpassword);

-					if(isset($_COOKIE[SITEKEY."_salt"])) setcookie(SITEKEY."_salt", md5($email+$encryptedpassword),  time()+60*60*24*30, "/");		

+					$_SESSION[SITEKEY."_salt"] = md5($email . $encryptedpassword);

+					if(isset($_COOKIE[SITEKEY."_salt"])) setcookie(SITEKEY."_salt", md5($email . $encryptedpassword),  time()+60*60*24*30, "/");		

 				}

 			}

 			$output .= write_message(_ACTIONSUCCESSFUL."  ".(isset($_GET['uid']) ? _BACK2ADMIN : _BACK2ACCT));


--- a/bridges/default/get_session_vars.php
+++ b/bridges/default/get_session_vars.php
@@ -27,7 +27,7 @@
 // To bridge to another program replace (or add to) this information with the bridge to your other script.  See examples in the includes/bridges/ folder.

 if (!empty($_COOKIE[$sitekey."_useruid"])) {

 	$userdata = dbassoc(dbquery("SELECT ap.*, "._UIDFIELD." as uid, "._PENNAMEFIELD." as penname, "._EMAILFIELD." as email, "._PASSWORDFIELD." as password FROM "._AUTHORTABLE." LEFT JOIN ".$tableprefix."fanfiction_authorprefs as ap ON ap.uid = "._UIDFIELD." WHERE "._UIDFIELD." = '".$_COOKIE[$sitekey."_useruid"]."'"));

-	if($userdata && $userdata['level'] != -1 && $_COOKIE[$sitekey.'_salt'] == md5($userdata['email']+$userdata['password'])) {

+	if($userdata && $userdata['level'] != -1 && $_COOKIE[$sitekey.'_salt'] == md5($userdata['email'] . $userdata['password'])) {

 		define("USERUID", $userdata['uid']);

 		define("USERPENNAME", $userdata['penname']);

 		if(!isset($_SESSION[$sitekey."_skin"]) && !empty($userdata['userskin'])) $siteskin = $userdata['userskin'];

@@ -42,7 +42,7 @@
 }

 if(!empty($_SESSION[$sitekey."_useruid"]) && !defined("USERUID")) {

 	$userdata = dbassoc(dbquery("SELECT ap.*, "._UIDFIELD." as uid, "._PENNAMEFIELD." as penname, "._EMAILFIELD." as email, "._PASSWORDFIELD." as password FROM "._AUTHORTABLE." LEFT JOIN ".$tableprefix."fanfiction_authorprefs as ap ON ap.uid = "._UIDFIELD." WHERE "._UIDFIELD." = '".$_SESSION[$sitekey."_useruid"]."'"));

-	if($userdata && $userdata['level'] != -1 && $_SESSION[$sitekey.'_salt'] == md5($userdata['email']+$userdata['password'])) {

+	if($userdata && $userdata['level'] != -1 && $_SESSION[$sitekey.'_salt'] == md5($userdata['email'] . $userdata['password'])) {

 		define("USERUID", $userdata['uid']);

 		define("USERPENNAME", $userdata['penname']);

 		if(!isset($_SESSION[$sitekey."_skin"]) && !empty($userdata['userskin'])) $siteskin = $userdata['userskin'];


--- a/bridges/default/login.php
+++ b/bridges/default/login.php
@@ -46,12 +46,12 @@
 		}

 		if(isset($_POST['cookiecheck'])) {

 			setcookie($sitekey."_useruid",$passwd['uid'], time()+60*60*24*30, "/");

-			setcookie($sitekey."_salt", md5($passwd['email']+$encryptedpassword),  time()+60*60*24*30, "/");

+			setcookie($sitekey."_salt", md5($passwd['email'] . $encryptedpassword),  time()+60*60*24*30, "/");

 		}

 		if($passwd['password'] == $encryptedpassword) {

 			if(!isset($_SESSION)) session_start( );

 			$_SESSION[$sitekey."_useruid"] = $passwd['uid'];

-			$_SESSION[$sitekey."_salt"] = md5($passwd['email']+$encryptedpassword);

+			$_SESSION[$sitekey."_salt"] = md5($passwd['email'] . $encryptedpassword);

 		}

 

 		else { 


--- a/bridges/php-fusion/login.php
+++ b/bridges/php-fusion/login.php
@@ -16,7 +16,7 @@
 		if($passwd['user_password'] == $encryptedpassword) {

 			if(!isset($_SESSION)) session_start( );

 			$_SESSION[$sitekey."_useruid"] = $passwd['user_id'];

-			$_SESSION[$sitekey."_salt"] = md5($passwd['user_email']+$encryptedpassword);

+			$_SESSION[$sitekey."_salt"] = md5($passwd['user_email'] . $encryptedpassword);

 			if(isset($_POST['cookiecheck'])) {

 				$cookie_exp = time() + 3600*24*30; } else { $cookie_exp = time() + 3600*3; 

 			}


--- a/includes/get_session_vars.php
+++ b/includes/get_session_vars.php
@@ -27,7 +27,7 @@
 // To bridge to another program replace (or add to) this information with the bridge to your other script.  See examples in the includes/bridges/ folder.

 if (!empty($_COOKIE[$sitekey."_useruid"])) {

 	$userdata = dbassoc(dbquery("SELECT ap.*, "._UIDFIELD." as uid, "._PENNAMEFIELD." as penname, "._EMAILFIELD." as email, "._PASSWORDFIELD." as password FROM "._AUTHORTABLE." LEFT JOIN ".TABLEPREFIX."fanfiction_authorprefs as ap ON ap.uid = "._UIDFIELD." WHERE "._UIDFIELD." = '".$_COOKIE[$sitekey."_useruid"]."'"));

-	if($userdata && $userdata['level'] != -1 && $_COOKIE[$sitekey.'_salt'] == md5($userdata['email']+$userdata['password'])) {

+	if($userdata && $userdata['level'] != -1 && $_COOKIE[$sitekey.'_salt'] == md5($userdata['email'] . $userdata['password'])) {

 		define("USERUID", $userdata['uid']);

 		define("USERPENNAME", $userdata['penname']);

 		// the following line fixes missing authorpref rows