diff --git a/components/ResetPassword.php b/components/ResetPassword.php index 335b1e65..a0d55d6a 100644 --- a/components/ResetPassword.php +++ b/components/ResetPassword.php @@ -89,6 +89,10 @@ public function onResetPassword() list($userId, $code) = $parts; + if (!$code || !strlen(trim($code))) { + throw new ApplicationException(trans('rainlab.user::lang.account.invalid_activation_code')); + } + if (!strlen(trim($userId)) || !($user = Auth::findUserById($userId))) { throw new ApplicationException(trans('rainlab.user::lang.account.invalid_user')); } @@ -108,4 +112,4 @@ public function code() return $this->param($routeParameter); } -} \ No newline at end of file +}