mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-01 03:05:09 +00:00
Code cleanup
This commit is contained in:
@@ -30,6 +30,7 @@ use RuntimeException;
|
||||
|
||||
/**
|
||||
* Class PwndVerifierV2.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class PwndVerifierV2 implements Verifier
|
||||
@@ -50,7 +51,7 @@ class PwndVerifierV2 implements Verifier
|
||||
$uri = sprintf('https://api.pwnedpasswords.com/range/%s', $prefix);
|
||||
$opt = [
|
||||
'headers' => [
|
||||
'User-Agent' => 'Firefly III v' . config('firefly.version'),
|
||||
'User-Agent' => 'Firefly III v' . config('firefly.version'),
|
||||
'Add-Padding' => 'true',
|
||||
],
|
||||
'timeout' => 3.1415];
|
||||
@@ -61,7 +62,7 @@ class PwndVerifierV2 implements Verifier
|
||||
try {
|
||||
$client = new Client();
|
||||
$res = $client->request('GET', $uri, $opt);
|
||||
} catch (GuzzleException|Exception $e) {
|
||||
} catch (GuzzleException | Exception $e) {
|
||||
Log::error(sprintf('Could not verify password security: %s', $e->getMessage()));
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user