Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use hash_equals instead of StringUtils::equals #6231

Merged
merged 1 commit into from
Feb 7, 2016

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented Feb 6, 2016

Q A
doc fix? yes
new docs? yes
applies to 2.3+
Fixed tickets -

We've merged #6104 in the 2.3 branch, so I think we should use the hash_equals function the 2.3 docs as well. Now, this article isn't related to the Security component at all and it might be a good start for the Polyfill component.

@@ -5,6 +5,11 @@ The Symfony Security component comes with a collection of nice utilities
related to security. These utilities are used by Symfony, but you should
also use them if you want to solve the problem they address.

.. note::

All functions described in this article were introduced in PHP 7. For older
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hash_equals() was introduced in PHP 5.6.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@xabbuh
Copy link
Member

xabbuh commented Feb 7, 2016

Thank you Wouter.

@xabbuh xabbuh merged commit 9f7f1dd into symfony:2.3 Feb 7, 2016
xabbuh added a commit that referenced this pull request Feb 7, 2016
This PR was merged into the 2.3 branch.

Discussion
----------

Use hash_equals instead of StringUtils::equals

| Q | A
| --- | ---
| doc fix? | yes
| new docs? | yes
| applies to | 2.3+
| Fixed tickets | -

We've merged #6104 in the 2.3 branch, so I think we should use the `hash_equals` function the 2.3 docs as well. Now, this article isn't related to the Security component at all and it might be a good start for the Polyfill component.

Commits
-------

9f7f1dd Use hash_equals instead of StringUtils::equals

The functions described in this article were introduced in PHP 5.6 or 7.
For older PHP versions, a polyfill is provided by the
`Symfony Polyfill Component`_.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a component section for the polyfills to which we can link instead where explain that you should rather install the polyfill packages you need instead of the big meta package imo (see #6052).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree.

@wouterj wouterj deleted the secure_tools-hash-equas branch February 7, 2016 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants