Skip to content

Commit

Permalink
Fix wrong check for result from query in password reset controller
Browse files Browse the repository at this point in the history
  • Loading branch information
DariusIII committed Sep 10, 2018
1 parent 911438a commit 4ebccb3
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 25 deletions.
2 changes: 2 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
2018-09-10 DariusIII
* Fix: Fix wrong check for result from query in password reset controller
2018-09-09 DariusIII
* Chg: Update filp/whoops to version 2.2.1
2018-09-08 DariusIII
Expand Down
7 changes: 6 additions & 1 deletion app/Http/Controllers/Auth/ResetPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,19 @@ public function __construct()
$this->middleware('guest');
}

/**
* @param \Illuminate\Http\Request $request
*
* @throws \Exception
*/
public function reset(Request $request)
{
if (! $request->has('guid')) {
app('smarty.view')->assign('error', 'No reset code provided.');
}

$ret = User::getByPassResetGuid($request->input('guid'));
if (! $ret) {
if ($ret === null) {
app('smarty.view')->assign('error', 'Bad reset code provided.');
}

Expand Down
72 changes: 48 additions & 24 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4ebccb3

Please sign in to comment.