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

[Security] #[CurrentUser] arguments should resolve to null for "anon."#40286

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
chalasr merged 1 commit intosymfony:5.2fromchalasr:fix-null-currentuser
Feb 24, 2021

Conversation

@chalasr
Copy link
Member

QA
Branch?5.2
Bug fix?yes
New feature?no
Deprecations?no
Tickets-
LicenseMIT
Doc PR-

The UserValueResolver should only resolveUserInterface (or subtype) typed arguments:

// in case it's not an object we cannot do anything with it; E.g. "anon."
return$userinstanceof UserInterface;

When using the#CurrentUser attribute with an AnonymousToken in the storage, the resolved argument value isanon.. This PR fixes it.

/cc@jvasseur

@carsonbotcarsonbot added this to the5.2 milestoneFeb 23, 2021
@chalasrchalasrforce-pushed thefix-null-currentuser branch 2 times, most recently fromba4dd23 todc7942bCompareFebruary 23, 2021 23:49
Copy link
Contributor

@jvasseurjvasseur left a comment

Choose a reason for hiding this comment

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

I think my goal was to support nullable arguments when no user are present but I forgot that anonymous users where strings and not null.

But I guess the nullable use case is already solved by theDefaultValueResolver so this is fine.

chalasr reacted with thumbs up emoji
@chalasrchalasr merged commitb037319 intosymfony:5.2Feb 24, 2021
@chalasrchalasr deleted the fix-null-currentuser branchFebruary 24, 2021 14:02
@fabpotfabpot mentioned this pull requestMar 4, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@wouterjwouterjwouterj approved these changes

+1 more reviewer

@jvasseurjvasseurjvasseur approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

5.2

Development

Successfully merging this pull request may close these issues.

4 participants

@chalasr@wouterj@jvasseur@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp