From a5cb692236c102e287ebfbf8e83efaa58e239f63 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Sat, 21 May 2016 16:34:41 +0200 Subject: [PATCH 1/3] Added a note about "encoding vs. hashing" passwords --- book/security.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/book/security.rst b/book/security.rst index acc2f90ad75..d0840794127 100644 --- a/book/security.rst +++ b/book/security.rst @@ -1148,6 +1148,12 @@ is defined by the ``target`` parameter above (e.g. the ``homepage``). Dynamically Encoding a Password ------------------------------- +.. note:: + + For historical reasons, Symfony uses the term *"password encoding"* when it + should really refer to *"password hashing"*. The "encoders" are in fact + `cryptographic hash functions`_. + If, for example, you're storing users in the database, you'll need to encode the users' passwords before inserting them. No matter what algorithm you configure for your user object, the hashed password can always be determined @@ -1319,4 +1325,5 @@ Learn More from the Cookbook .. _`online tool`: https://www.dailycred.com/blog/12/bcrypt-calculator .. _`frameworkextrabundle documentation`: https://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html +.. _`cryptographic hash functions`: https://en.wikipedia.org/wiki/Cryptographic_hash_function .. _`HWIOAuthBundle`: https://github.com/hwi/HWIOAuthBundle From 45f586bb47e274ed46edff1f70274b49d539c82d Mon Sep 17 00:00:00 2001 From: Jules Pietri Date: Sat, 21 May 2016 16:40:24 +0200 Subject: [PATCH 2/3] Fixed query_builder option --- reference/forms/types/entity.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/reference/forms/types/entity.rst b/reference/forms/types/entity.rst index fa7bba98bde..4d93e776a45 100644 --- a/reference/forms/types/entity.rst +++ b/reference/forms/types/entity.rst @@ -166,12 +166,13 @@ cast into a string and so must have a ``__toString()`` method. query_builder ~~~~~~~~~~~~~ -**type**: ``Doctrine\ORM\QueryBuilder`` or a Closure +**type**: ``Doctrine\ORM\QueryBuilder`` or a Closure **default**: ``null`` Allows you to create a custom query for your choices. See :ref:`ref-form-entity-query-builder` for an example. -The value of this option can either be a ``QueryBuilder`` object or a Closure. +The value of this option can either be a ``QueryBuilder`` object, a Closure or +``null`` by default which loads all entities. When using a Closure, you will be passed the ``EntityRepository`` of the entity as the only argument and should return a ``QueryBuilder``. From 31de26fa95fdaa06354db7b61450538670b711aa Mon Sep 17 00:00:00 2001 From: WouterJ Date: Sat, 21 May 2016 16:59:50 +0200 Subject: [PATCH 3/3] [#6596] Make sentence a little bit more correct --- reference/forms/types/entity.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reference/forms/types/entity.rst b/reference/forms/types/entity.rst index 4d93e776a45..5d4c3cc7183 100644 --- a/reference/forms/types/entity.rst +++ b/reference/forms/types/entity.rst @@ -172,9 +172,9 @@ Allows you to create a custom query for your choices. See :ref:`ref-form-entity-query-builder` for an example. The value of this option can either be a ``QueryBuilder`` object, a Closure or -``null`` by default which loads all entities. -When using a Closure, you will be passed the ``EntityRepository`` of the entity -as the only argument and should return a ``QueryBuilder``. +``null`` (which will load all entities). When using a Closure, you will be +passed the ``EntityRepository`` of the entity as the only argument and should +return a ``QueryBuilder``. Overridden Options ------------------