Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed strcmp(): Passing null to parameter #1 ($string1) of type strin… #4212

Merged
merged 5 commits into from
Sep 23, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/code/core/Mage/Customer/controllers/AccountController.php
Original file line number Diff line number Diff line change
Expand Up @@ -931,8 +931,8 @@ protected function _validateResetPasswordLinkToken($customerId, $resetPasswordLi
throw Mage::exception('Mage_Core', $this->_getHelper('customer')->__('Wrong customer account specified.'));
}

$customerToken = $customer->getRpToken();
if (strcmp($customerToken, $resetPasswordLinkToken) != 0 || $customer->isResetPasswordLinkTokenExpired()) {
$customerToken = (string) $customer->getRpToken();
if (strcmp($customerToken, $resetPasswordLinkToken) !== 0 || $customer->isResetPasswordLinkTokenExpired()) {
kiatng marked this conversation as resolved.
Show resolved Hide resolved
throw Mage::exception('Mage_Core', $this->_getHelper('customer')->__('Your password reset link has expired.'));
}
}
Expand Down