Skip to content

Commit c13bc41

Browse files
committed
Merge branch '5.4' into 6.2
* 5.4: [Security] Removing "Most applications will only need one firewall" Adding needsRehash() Replace orm-pack with orm Tweaks Changing "white spaces" => "whitespace"
2 parents bf3a409 + c982784 commit c13bc41

File tree

4 files changed

+17
-10
lines changed

4 files changed

+17
-10
lines changed

components/string.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,10 @@ There is also a method to get the bytes stored at some position::
165165
b('नमस्ते')->bytesAt(1); // [164]
166166
u('नमस्ते')->bytesAt(1); // [224, 164, 174]
167167

168-
Methods Related to Length and White Spaces
169-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
168+
.. _methods-related-to-length-and-white-spaces:
169+
170+
Methods Related to Length and Whitespace Characters
171+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
170172

171173
::
172174

@@ -190,14 +192,14 @@ Methods Related to Length and White Spaces
190192
END";
191193
u($text)->width(); // 14
192194

193-
// only returns TRUE if the string is exactly an empty string (not even white spaces)
195+
// only returns TRUE if the string is exactly an empty string (not even whitespace)
194196
u('hello world')->isEmpty(); // false
195197
u(' ')->isEmpty(); // false
196198
u('')->isEmpty(); // true
197199

198-
// removes all white spaces from the start and end of the string and replaces two
199-
// or more consecutive white spaces inside contents by a single white space
200-
u(" \n\n hello world \n \n")->collapseWhitespace(); // 'hello world'
200+
// removes all whitespace (' \n\r\t\x0C') from the start and end of the string and
201+
// replaces two or more consecutive whitespace characters with a single space (' ') character
202+
u(" \n\n hello \t \n\r world \n \n")->collapseWhitespace(); // 'hello world'
201203

202204
Methods to Change Case
203205
~~~~~~~~~~~~~~~~~~~~~~
@@ -286,7 +288,7 @@ Methods to Pad and Trim
286288
// repeats the given string the number of times passed as argument
287289
u('_.')->repeat(10); // '_._._._._._._._._._.'
288290

289-
// removes the given characters (by default, white spaces) from the string
291+
// removes the given characters (default: whitespace characters) from the beginning and end of a string
290292
u(' Lorem Ipsum ')->trim(); // 'Lorem Ipsum'
291293
u('Lorem Ipsum ')->trim('m'); // 'Lorem Ipsum '
292294
u('Lorem Ipsum')->trim('m'); // 'Lorem Ipsu'

reference/configuration/security.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -796,8 +796,7 @@ The name of the ``$_SERVER`` parameter holding the user identifier.
796796
Firewall Context
797797
~~~~~~~~~~~~~~~~
798798

799-
Most applications will only need one :ref:`firewall <firewalls-authentication>`.
800-
But if your application *does* use multiple firewalls, you'll notice that
799+
If your application uses multiple :ref:`firewalls <firewalls-authentication>`, you'll notice that
801800
if you're authenticated in one firewall, you're not automatically authenticated
802801
in another. In other words, the systems don't share a common "context":
803802
each firewall acts like a separate security system.

security/passwords.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,12 @@ If you need to create your own, it needs to follow these rules:
827827
828828
return $passwordIsValid;
829829
}
830+
831+
public function needsRehash(string $hashedPassword): bool
832+
{
833+
// Check if a password hash would benefit from rehashing
834+
return $needsRehash;
835+
}
830836
}
831837
832838
Now, define a password hasher using the ``id`` setting:

setup/flex.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ manual steps:
7474

7575
.. code-block:: terminal
7676
77-
$ composer require annotations asset orm-pack twig \
77+
$ composer require annotations asset orm twig \
7878
logger mailer form security translation validator
7979
$ composer require --dev dotenv maker-bundle orm-fixtures profiler
8080

0 commit comments

Comments
 (0)