mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-10-01 01:36:00 -04: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
@ -21,6 +21,7 @@ class Handler extends ExceptionHandler
|
||||
*/
|
||||
protected $dontReport = [
|
||||
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>
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user