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

Fix empty login on Chrome-based browsers #661

Closed

Conversation

fiammybe
Copy link
Member

Fix #100
This will fix the long-standing bug that happens when you login from the user.php page (and not using the block on the homepage or somewhere else).

@fiammybe fiammybe added the bug label Jun 22, 2020
@fiammybe fiammybe added this to the 1.4.1 milestone Jun 22, 2020
@fiammybe fiammybe requested a review from MekDrop June 22, 2020 11:39
@fiammybe fiammybe self-assigned this Jun 22, 2020
Copy link
Member

@MekDrop MekDrop left a comment

Choose a reason for hiding this comment

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

I think the bug is somewhere else. This fix could introduce another problem because it would always redirect when xoops_redirect is missing but some sections of code user.php doesn't needs such code so it will be not accessible.

Also, from GIT history I see that code line was changed for 1.3.8_beta but this bug become visible later.

@fiammybe
Copy link
Member Author

Possibly. The reason we have a blank page is because, when you start from the user.php page to login, the redirect is empty, and in the end of the login process, ImpressCMS tries to redirect you to "", which won't work of course.

I'll try to find out why in this case the problem is there and why it is not present when I am using exactly the same code in the same file when trying to login using the user block on the frontpage.

@fiammybe
Copy link
Member Author

fiammybe commented Jul 3, 2020

In effect, you are correct. When I go to the /user.php page on a newly installed site, I have 2 ways of logging in : via the block in the side column, and via the block on the page itself.

The block in the side column works as expected, and this is the form data from the request that is generated:
uname: xxxx
pass: yyyy
xoops_redirect: /test14/user.php
op: login

When I try to login in the main block of the page, the form data is missing content for the xoops_redirect variable:
uname: xxxx
pass: yyyy
op: login
xoops_redirect:

Looking at the difference, in the block, the xoops_redirect parameter in the system_block_login.html template is using the $xoops_requesturi variable, where the user.php page is using the system_userform.html template with the $redirect_page variable.

When I put the $xoops_requesturi variable in the place of $redirect_page in the system_userform.html template, the login works as expected.

@fiammybe fiammybe closed this Jul 3, 2020
@fiammybe fiammybe added this to Done in ImpressCMS v1.x via automation Jul 3, 2020
@fiammybe fiammybe deleted the fix-blank-login-on-chromium-browsers branch July 3, 2020 15:35
@fiammybe
Copy link
Member Author

fiammybe commented Jul 3, 2020

correct implementation is on #670

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

Successfully merging this pull request may close these issues.

None yet

2 participants