Skip to content

Commit

Permalink
Fix session id pattern. (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeykalenyuk authored Aug 25, 2021
1 parent c8b249b commit 67c2ec4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions migrateSessions.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
if ( ! is_readable($file)) {
die("Could not read $file. Please run the script as root or as the web server user.\n");
}
if ( ! preg_match('/^sess_(\w+)$/', $sessionFile, $matches)) {
die("Session file name does not match expected pattern (sess_\\w+): $sessionFile\n");
if ( ! preg_match('/^sess_([a-zA-Z0-9,-]+)$/', $sessionFile, $matches)) {
die("Session file name does not match expected pattern (sess_[a-zA-Z0-9,-]+): $sessionFile\n");
}
$sessionId = $matches[1];
$i++;
Expand Down

0 comments on commit 67c2ec4

Please sign in to comment.