}
if (isset($_REQUEST['token'])) $this->token = StringUtil::trim($_REQUEST['token']);
- if (empty($this->token) || \hash_equals($this->user->notificationMailToken, $this->token)) {
+ if (empty($this->token) || !\hash_equals($this->user->notificationMailToken, $this->token)) {
throw new IllegalLinkException();
}
}
if (!$this->user->userID) throw new IllegalLinkException();
if (!$this->user->lostPasswordKey) throw new IllegalLinkException();
- if (\hash_equals($this->user->lostPasswordKey, $this->lostPasswordKey)) {
+ if (!\hash_equals($this->user->lostPasswordKey, $this->lostPasswordKey)) {
throw new IllegalLinkException();
}
// expire lost password requests after a day