Skip to content

Attempt at fixing #2603 and superseding #2545#2625

Merged
ozh merged 9 commits intomasterfrom
issue2603
Mar 25, 2020
Merged

Attempt at fixing #2603 and superseding #2545#2625
ozh merged 9 commits intomasterfrom
issue2603

Conversation

@ozh
Copy link
Copy Markdown
Member

@ozh ozh commented Mar 22, 2020

This all boils down to redirecting to $_SERVER['REQUEST_URI'] after successful login and using less $_SERVER variables ('HTTP_HOST', 'HOSTNAME', 'SERVERNAME' or whatnot)

This all boils down to redirecting to $_SERVER['REQUEST_URI'] after successful login
Copy link
Copy Markdown
Member

@LeoColomb LeoColomb left a comment

Choose a reason for hiding this comment

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

Few comments 😄

Otherwise lgtm 👍

@ozh ozh mentioned this pull request Mar 23, 2020
ozh and others added 6 commits March 23, 2020 19:03
- no dying
- no output if we're on cli
Co-Authored-By: Léo Colombaro <git@colombaro.fr>
Co-Authored-By: Léo Colombaro <git@colombaro.fr>
Do not rely on HOSTNAME, HTTP_HOST or whatever, just use YOURLS_SITE
@pcolmer
Copy link
Copy Markdown
Contributor

pcolmer commented Mar 25, 2020

@ozh I've tested this on our Docker installation and it fixes the issues I was encountering. Thank you.

[skip ci] [skip scrutinizer]
@ozh
Copy link
Copy Markdown
Member Author

ozh commented Mar 25, 2020

Merging. Thanks @hangxingliu and @pcolmer for insightful feedbacks which has led to this PR

@ozh ozh merged commit 916377d into master Mar 25, 2020
@ozh ozh deleted the issue2603 branch March 25, 2020 13:41
tomtenuta pushed a commit to tomtenuta/YOURLS that referenced this pull request Nov 4, 2025
* Attempt at fixing YOURLS#2603 and superseding YOURLS#2545

This all boils down to redirecting to $_SERVER['REQUEST_URI'] after successful login
Thanks @hangxingliu and @pcolmer for insightful feedbacks which has led to this PR

* Refactor slightly the redirect function

- no dying
- no output if we're on cli

* Update tests/includes/utils.php

Co-Authored-By: Léo Colombaro <git@colombaro.fr>

* Update includes/functions.php

Co-Authored-By: Léo Colombaro <git@colombaro.fr>

* Rewrite yourls_get_request()

Do not rely on HOSTNAME, HTTP_HOST or whatever, just use YOURLS_SITE

* Remove leftover comment

[skip ci] [skip scrutinizer]

Co-authored-by: Léo Colombaro <git@colombaro.fr>
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

Successfully merging this pull request may close these issues.

3 participants