Browse Source

! Update for additional valid session characters when session.hash_bits_per_character is set to 6

Spuds 12 years ago
parent
commit
cffb9c6f39
1 changed files with 3 additions and 3 deletions
  1. 3 3
      Sources/Session.php

+ 3 - 3
Sources/Session.php

@@ -129,7 +129,7 @@ function sessionRead($session_id)
 {
 	global $smcFunc;
 
-	if (preg_match('~^[A-Za-z0-9]{16,32}$~', $session_id) == 0)
+	if (preg_match('~^[A-Za-z0-9,-]{16,32}$~', $session_id) == 0)
 		return false;
 
 	// Look for it in the database.
@@ -159,7 +159,7 @@ function sessionWrite($session_id, $data)
 {
 	global $smcFunc;
 
-	if (preg_match('~^[A-Za-z0-9]{16,32}$~', $session_id) == 0)
+	if (preg_match('~^[A-Za-z0-9,-]{16,32}$~', $session_id) == 0)
 		return false;
 
 	// First try to update an existing row...
@@ -196,7 +196,7 @@ function sessionDestroy($session_id)
 {
 	global $smcFunc;
 
-	if (preg_match('~^[A-Za-z0-9]{16,32}$~', $session_id) == 0)
+	if (preg_match('~^[A-Za-z0-9,-]{16,32}$~', $session_id) == 0)
 		return false;
 
 	// Just delete the row...