mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-04-23 20:30:22 +00:00
Prevented inadvertant logging during MFA flow
- Added StoppedAuthenticationException to dontReport list. - Added test to cover. Closes #3468
This commit is contained in:
parent
43cbab2822
commit
16e023985d
2 changed files with 11 additions and 0 deletions
|
@ -21,6 +21,7 @@ class Handler extends ExceptionHandler
|
||||||
*/
|
*/
|
||||||
protected $dontReport = [
|
protected $dontReport = [
|
||||||
NotFoundException::class,
|
NotFoundException::class,
|
||||||
|
StoppedAuthenticationException::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -241,6 +241,16 @@ class MfaVerificationTest extends TestCase
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function test_login_mfa_interception_does_not_log_error()
|
||||||
|
{
|
||||||
|
$logHandler = $this->withTestLogger();
|
||||||
|
|
||||||
|
[$user, $secret, $loginResp] = $this->startTotpLogin();
|
||||||
|
|
||||||
|
$loginResp->assertRedirect('/mfa/verify');
|
||||||
|
$this->assertFalse($logHandler->hasErrorRecords());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array<User, string, TestResponse>
|
* @return array<User, string, TestResponse>
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue