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/Http] Ignore invalid URLs found in failure/success paths#46317

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
fabpot merged 1 commit intosymfony:4.4fromnicolas-grekas:login_path
May 13, 2022

Conversation

@nicolas-grekas
Copy link
Member

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#43567
LicenseMIT
Doc PR-

Copy link
Member

@wouterjwouterj left a comment

Choose a reason for hiding this comment

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

sorry, too quick

if (\is_string($failureUrl) &&str_starts_with($failureUrl,'/')) {
$options['failure_path'] =$failureUrl;
}elseif ($this->logger &&$failureUrl) {
$this->logger->debug(sprintf('Ignoring query parameter "%s": not a valid URL.',$options['failure_path_parameter']));
Copy link
Member

Choose a reason for hiding this comment

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

Should we include the value in the log message/context?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I don't think so: this is user input, might be just garbage. The query parameter name is enough to me.

}

if ($this->options['failure_forward']) {
$options['failure_path'] ??$options['failure_path'] =$options['login_path'];
Copy link
Member

Choose a reason for hiding this comment

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

I must confess that I'm not at all sure if I understand what is going on here. Is this a leftover?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

This is$options['failure_path'] ??= $options['login_path']; written for PHP 7.1+

@fabpot
Copy link
Member

Thank you@nicolas-grekas.

@fabpotfabpot merged commita6f405a intosymfony:4.4May 13, 2022
@fabpotfabpot deleted the login_path branchMay 13, 2022 09:18
@fabpotfabpot mentioned this pull requestMay 14, 2022
This was referencedMay 27, 2022
@crmpicco
Copy link

Is there a recommended way to pass through thetarget_path now? It appears this change has broken the login functionality in some of my code. I createda discussion relating to it last week.

fabpot added a commit that referenced this pull requestJul 29, 2022
…m Ward)This PR was merged into the 4.4 branch.Discussion----------[Security] Allow redirect after login to absolute URLs| Q             | A| ------------- | ---| Branch?       | 4.4| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Tickets       |Fix#46533| License       | MIT| Doc PR        |Fixes the regression introduced by#46317, and once again allows absolute URLs to be the target of authentication redirection, as specified in the documentation (https://symfony.com/doc/current/security/form_login.html#changing-the-default-page)Commits-------b9901aa [Security] Allow redirect after login to absolute URLs
nanasess added a commit to nanasess/ec-cube that referenced this pull requestAug 8, 2022
- seesymfony/symfony#46317- _target_path 及び _failure_path はURLまたはパスを指定する必要がある- アプリケーション範囲外の URL を指定された場合は homepage へリダイレクトする
nanasess added a commit to nanasess/ec-cube that referenced this pull requestAug 8, 2022
- seesymfony/symfony#46317- _target_path 及び _failure_path はURLまたはパスを指定する必要がある- アプリケーション範囲外の URL を指定された場合は homepage へリダイレクトする
@nanasessnanasess mentioned this pull requestAug 8, 2022
15 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@wouterjwouterjwouterj requested changes

@fabpotfabpotfabpot approved these changes

@chalasrchalasrchalasr approved these changes

+1 more reviewer

@maxheliasmaxheliasmaxhelias 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

@nicolas-grekas@fabpot@crmpicco@wouterj@chalasr@maxhelias@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp