Skip to content

Commit

Permalink
minor #35628 [Security] Improve info UserPasswordEncoderCommand (wimm…
Browse files Browse the repository at this point in the history
…e002)

This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #35628).

Discussion
----------

[Security] Improve info UserPasswordEncoderCommand

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| License       | MIT
| Doc PR        | n/a

`php bin/console security:encode-password [password] App\Entity\User`
will result in
`No encoder has been configured for account "AppEntityUser".  `

If a full class path is used, it either has to be passed in as a string or has to be escaped by double slashes.

Commits
-------

3604bb7 Update UserPasswordEncoderCommand.php
  • Loading branch information
fabpot committed Feb 7, 2020
2 parents adacae6 + 3604bb7 commit 36ffca3
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -87,16 +87,16 @@ protected function configure()
Pass the full user class path as the second argument to encode passwords for
your own entities:
<info>php %command.full_name% --no-interaction [password] App\Entity\User</info>
<info>php %command.full_name% --no-interaction [password] 'App\Entity\User'</info>
Executing the command interactively allows you to generate a random salt for
encoding the password:
<info>php %command.full_name% [password] App\Entity\User</info>
<info>php %command.full_name% [password] 'App\Entity\User'</info>
In case your encoder doesn't require a salt, add the <comment>empty-salt</comment> option:
<info>php %command.full_name% --empty-salt [password] App\Entity\User</info>
<info>php %command.full_name% --empty-salt [password] 'App\Entity\User'</info>
EOF
)
Expand Down

0 comments on commit 36ffca3

Please sign in to comment.