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

[CLARIFY] Update Auth.php #707

Closed
wants to merge 1 commit into from
Closed

[CLARIFY] Update Auth.php #707

wants to merge 1 commit into from

Conversation

brunoribeiro94
Copy link

shows only the redirect parameter if there is any page to redirect.
I switched 'REQUEST_URI' to 'REDIRECT_QUERY_STRING' because if this framework is working in a subfolder, the subfolder name is ignored in parameter.

shows only the redirect parameter if there is any page to redirect.
I switched 'REQUEST_URI' to 'REDIRECT_QUERY_STRING' because if this framework is working in a subfolder, the subfolder name is ignored in parameter.
@panique panique changed the title Update Auth.php [TO TEST] Update Auth.php Sep 7, 2015
@panique panique changed the title [TO TEST] Update Auth.php [TEST / CLARIFY] Update Auth.php Sep 7, 2015
@brunoribeiro94
Copy link
Author

Hi @panique.

I'm using the framework in a subfolder and redirect the page happens a problem with the URL that finished being redirected to error 404 page not found.

I noticed this problem and found that $_SERVER ['REQUEST_URI'] if you are using a subfolder that subfolder is not ignored.

To solve this I used the $_SERVER ['REDIRECT_QUERY_STRING'] that ignores the subfolder thus redirecting to correct page in addition I put a check in the URL so prevents parameter "redirect" if there is no value.

I tested on PHP Version 5.6.8

@panique
Copy link
Owner

panique commented Sep 14, 2015

@Offboard Can you please say where you got infos about REDIRECT_QUERY_STRING ? Because I could not find any official documentation about this, and as this is a security-critical project I really need to be 100% sure how REDIRECT_QUERY_STRING works in every possible case.

Would be cool if you could give some infos about a docs page or so...

@panique panique changed the title [TEST / CLARIFY] Update Auth.php [CLARIFY] Update Auth.php Sep 15, 2015
@brunoribeiro94
Copy link
Author

@panique I found on this page http:https://php.net/manual/en/reserved.variables.php I not found oficial documentation about REDIRECT_QUERY_STRING.

In fact I found REDIRECT_QUERY_STRING by chance when I was debugging the code.

@panique
Copy link
Owner

panique commented Sep 16, 2015

Hmm looks like this is only available under apache but not with nginx and other. This is tricky! Please gimme some time to investigate this issue.

@panique
Copy link
Owner

panique commented Oct 11, 2015

He @Offboard , I just saw that the auto-installer installs the project inside a sub-folder on apache, and the problem you desribed doesn't seem to be there... hmm..

Have a look here, https://github.com/panique/huge/blob/master/_one-click-installation/bootstrap.sh please.

Can you please say how to reproduce your problem ?

@brunoribeiro94
Copy link
Author

Hey @panique, I looked at the file and saw nothing about installing in a subfolder an example "PROJECTFOLDER='teste/myproject'".

If there is no support for subfolders only disregard the pull request otherwise, when leftover me time I will add more information about the problem and will develop an alternative to fix this issue.

@panique
Copy link
Owner

panique commented Oct 11, 2015

Sorry i don't understand the last comment to be honest! In the autoinstaller i meant this line:

sudo mkdir "/var/www/html/${PROJECTFOLDER}"

which installs the project inside a subfolder. Maybe you mean something different, like example.com/subfolder, not example.com for the project ? This is not really possible afaik by default, as the apache settings / configs for sure think that there's only ONE project installed on the server.

Is it okay if i close this ticket ?

@brunoribeiro94
Copy link
Author

@panique Yes, u can disconsider this ticket.

@panique panique closed this Oct 16, 2015
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.

None yet

3 participants