소스 검색

[Security] tweaked some exception messages

Fabien Potencier 14 년 전
부모
커밋
e6fd8deb00
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/Symfony/Component/Security/Core/Authentication/Provider/DaoAuthenticationProvider.php

+ 2 - 2
src/Symfony/Component/Security/Core/Authentication/Provider/DaoAuthenticationProvider.php

@@ -59,11 +59,11 @@ class DaoAuthenticationProvider extends UserAuthenticationProvider
             }
         } else {
             if (!$presentedPassword = $token->getCredentials()) {
-                throw new BadCredentialsException('Bad credentials');
+                throw new BadCredentialsException('The presented password cannot be empty.');
             }
 
             if (!$this->encoderFactory->getEncoder($user)->isPasswordValid($user->getPassword(), $presentedPassword, $user->getSalt())) {
-                throw new BadCredentialsException('Bad credentials');
+                throw new BadCredentialsException('The presented password is invalid.');
             }
         }
     }