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

Open redirect in crud/default/views/_form.php #164

Open
id3s3c opened this issue Mar 23, 2021 · 2 comments
Open

Open redirect in crud/default/views/_form.php #164

id3s3c opened this issue Mar 23, 2021 · 2 comments

Comments

@id3s3c
Copy link

id3s3c commented Mar 23, 2021

I was poking at one of my companies internal website and saw that changing the Referer: header redirected me to the location of the URL in it. After talking to the dev we fixed changing the line 103 from:

<?= "<?= " ?>Html::a(Yii::t('app', 'Cancel'), Yii::$app->request->referrer , ['class'=> 'btn btn-danger']) ?>

to

<?= "<?= " ?>Html::a(Yii::t('app', 'Cancel'), parse_url(Yii::$app->request->referrer, PHP_URL_PATH), ['class'=> 'btn btn-danger']) ?>

Cheers.

@xyu3xx
Copy link

xyu3xx commented Mar 23, 2021

Ye, I have this problem
Thanks for show how to fix

@mootensai
Copy link
Owner

please make PR for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants