From beda3721ec496b11809a4b52d3a49681f51117cd Mon Sep 17 00:00:00 2001 From: Mathieu Date: Sat, 5 Dec 2015 10:39:12 +0100 Subject: [PATCH 1/2] Update security.rst | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 2.7+ | Fixed tickets | #5698 --- book/security.rst | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/book/security.rst b/book/security.rst index 5953e702654..61eeb10b4b8 100644 --- a/book/security.rst +++ b/book/security.rst @@ -510,11 +510,16 @@ else, you'll want to encode their passwords. The best algorithm to use is // ... )); -.. include:: /cookbook/security/_ircmaxwell_password-compat.rst.inc +.. include:: /cookbook/security/_ircmaxwell_password-compat.rst.inco Of course, your users' passwords now need to be encoded with this exact algorithm. -For hardcoded users, you can use an `online tool`_, which will give you something -like this: +For hardcoded users, since 2.7 you can use the built-in command : + +.. code-block:: bash + + $ php bin/console security:encode-password + +It will give you something like this: .. configuration-block:: @@ -1413,7 +1418,6 @@ Learn More from the Cookbook * :doc:`/cookbook/security/remember_me` * :doc:`/cookbook/security/multiple_user_providers` -.. _`online tool`: https://www.dailycred.com/blog/12/bcrypt-calculator .. _`frameworkextrabundle documentation`: https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html .. _`security advisories database`: https://github.com/FriendsOfPHP/security-advisories .. _`HWIOAuthBundle`: https://github.com/hwi/HWIOAuthBundle From f722d6340a774f81caccb1df86ad4084c8672d39 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Sat, 5 Dec 2015 11:08:58 +0100 Subject: [PATCH 2/2] Update security.rst --- book/security.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/book/security.rst b/book/security.rst index 61eeb10b4b8..9e679727d14 100644 --- a/book/security.rst +++ b/book/security.rst @@ -510,7 +510,7 @@ else, you'll want to encode their passwords. The best algorithm to use is // ... )); -.. include:: /cookbook/security/_ircmaxwell_password-compat.rst.inco +.. include:: /cookbook/security/_ircmaxwell_password-compat.rst.inc Of course, your users' passwords now need to be encoded with this exact algorithm. For hardcoded users, since 2.7 you can use the built-in command :