Skip to content

Commit

Permalink
Merge pull request #166 from justsly/patch-1
Browse files Browse the repository at this point in the history
fix concat bug in php, thx justsly
  • Loading branch information
atutor committed Apr 14, 2019
2 parents 57f990d + 557dc83 commit da5f598
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions password_reminder.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
//date link was generated (# days since epoch)
$gen = intval(((time()/60)/60)/24);

$hash = sha1($row['member_id'] + $gen + $row['password']);
$hash = sha1($row['member_id'] . $gen . $row['password']);
$hash_bit = substr($hash, 5, 15);

$change_link = $_base_href.'password_reminder.php?id='.$row['member_id'].'&g='.$gen.'&h='.$hash_bit;
Expand Down Expand Up @@ -91,7 +91,7 @@
if (isset($row['email']) && $row['email'] != '') {
$email = $row['email'];

$hash = sha1($_REQUEST['id'] + $_REQUEST['g'] + $row['password']);
$hash = sha1($_REQUEST['id'] . $_REQUEST['g'] . $row['password']);
$hash_bit = substr($hash, 5, 15);

if ($_REQUEST['h'] !== $hash_bit) {
Expand Down

0 comments on commit da5f598

Please sign in to comment.