Преглед на файлове

[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.');
             }
         }
     }