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

Login Issue : $AppUI->redirect swapps "&" with "&" #173

Open
AlexBestoso opened this issue Apr 1, 2022 · 1 comment
Open

Login Issue : $AppUI->redirect swapps "&" with "&" #173

AlexBestoso opened this issue Apr 1, 2022 · 1 comment

Comments

@AlexBestoso
Copy link

From doing some testing with a heavily modified version of dotproject, I encountered an issue regarding the redirect function post logging in.

Issue :
If you have a link stored in an email, for example, that is formatted like :

http://localhost/dotproject/index.php?m=contracts&a=view&contract_id=2

If you click your link while your logged out, you'll be greeted by the login page. This is expected.

AFTER you loging, the redirect function will replace the "&" characters with "&". This prevents the end user from viewing what ever object it is that they have.

I was able to correct the issue with a simple adjustment to the CAppUI::redirect function.

The fix that worked for me was replacing

header('Location: index.php?' . $params);

with

header('Location: index.php?' . str_replace("&", "&", $params));

I believe the issue has something to do with the ob_implicit_flush() line right above and inspecting the $params variable before the hitting the header() function shows that there's no "&" in the string.

The suggested fix worked for me, sharing to help the project.

@AlexBestoso
Copy link
Author

git replaced my strings with actual ampersands.

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

1 participant