X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FGuzzleSiteAuthenticator%2FGrabySiteConfigBuilder.php;h=10689c62bbf82e631dda0da5f708b23dccc163f2;hb=f808b01692a835673f328d7221ba8c212caa9b61;hp=62a3bc1319fc0bf89a7a69d6e2c984a605ec7ba4;hpb=9de9f1e5ceed4ac7ecd27e1cb808e630a831f94b;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php b/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php index 62a3bc13..10689c62 100644 --- a/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php +++ b/src/Wallabag/CoreBundle/GuzzleSiteAuthenticator/GrabySiteConfigBuilder.php @@ -6,8 +6,8 @@ use BD\GuzzleSiteAuthenticator\SiteConfig\SiteConfig; use BD\GuzzleSiteAuthenticator\SiteConfig\SiteConfigBuilder; use Graby\SiteConfig\ConfigBuilder; use Psr\Log\LoggerInterface; -use Wallabag\CoreBundle\Repository\SiteCredentialRepository; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; +use Wallabag\CoreBundle\Repository\SiteCredentialRepository; class GrabySiteConfigBuilder implements SiteConfigBuilder { @@ -57,7 +57,7 @@ class GrabySiteConfigBuilder implements SiteConfigBuilder { // required by credentials below $host = strtolower($host); - if (substr($host, 0, 4) == 'www.') { + if (substr($host, 0, 4) === 'www.') { $host = substr($host, 4); } @@ -87,7 +87,8 @@ class GrabySiteConfigBuilder implements SiteConfigBuilder $config = new SiteConfig($parameters); - // do not leak password in log + // do not leak usernames and passwords in log + $parameters['username'] = '**masked**'; $parameters['password'] = '**masked**'; $this->logger->debug('Auth: add parameters.', ['host' => $host, 'parameters' => $parameters]);