Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Validator] prevent hash collisions caused by reused object hashes#38387

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
xabbuh merged 2 commits intosymfony:4.4fromxabbuh:validator-cache-key-collisions
Nov 13, 2020

Conversation

@xabbuh
Copy link
Member

QA
Branch?3.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#36415
LicenseMIT
Doc PR

@xabbuh
Copy link
MemberAuthor

ping@fancyweb

@nicolas-grekasnicolas-grekas changed the title[Validator] prevent hash collisions caused by resued object hashes[Validator] prevent hash collisions caused by reused object hashesOct 2, 2020
returnspl_object_hash($object);
}

privatefunctioncleanUpObjectRefs()
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't calls to thiscleanUpObjectRefs happen in afinally block instead, to be sure we also record the end of the callstack when some called code triggers an exception ?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

In fact keeping the object references in the validator instance does not work as expected as new validator instances can be created in one validation run. I decided to move the reference handling to the execution context instead which also saves us from worrying about have to clean up the stored references instead.

fancyweb reacted with thumbs up emoji
@xabbuhxabbuhforce-pushed thevalidator-cache-key-collisions branch 3 times, most recently from907ddf6 to752d2a4CompareOctober 2, 2020 14:55
Copy link
Contributor

@fancywebfancyweb left a comment

Choose a reason for hiding this comment

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

As discussed on Slack, we would need a test that assert that using the same constraint instance on several paths on the sameRecursiveContextualValidator instance (by usingatPath()) works correctly.

@xabbuhxabbuhforce-pushed thevalidator-cache-key-collisions branch 2 times, most recently from15b77b1 to85f359cCompareOctober 7, 2020 11:21
@fabpotfabpot modified the milestones:3.4,4.4Oct 28, 2020
@xabbuhxabbuhforce-pushed thevalidator-cache-key-collisions branch from85f359c to9c81f2aCompareNovember 12, 2020 08:35
@xabbuhxabbuh changed the base branch from3.4 to4.4November 12, 2020 08:37
@xabbuhxabbuhforce-pushed thevalidator-cache-key-collisions branch 3 times, most recently from89c48ea to099886fCompareNovember 12, 2020 14:30
@xabbuhxabbuhforce-pushed thevalidator-cache-key-collisions branch from099886f to8dd1a6eCompareNovember 13, 2020 09:14
@xabbuh
Copy link
MemberAuthor

Thank you@fancyweb.

@xabbuhxabbuh merged commitc72f853 intosymfony:4.4Nov 13, 2020
@xabbuhxabbuh deleted the validator-cache-key-collisions branchNovember 13, 2020 09:31
@fabpotfabpot mentioned this pull requestNov 21, 2020
This was referencedNov 29, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof left review comments

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@ycerutoycerutoyceruto approved these changes

@dunglasdunglasAwaiting requested review from dunglas

@lyrixxlyrixxAwaiting requested review from lyrixx

@srozesrozeAwaiting requested review from sroze

+1 more reviewer

@fancywebfancywebfancyweb approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

7 participants

@xabbuh@nicolas-grekas@stof@yceruto@fancyweb@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp