usu icon indicating copy to clipboard operation
usu copied to clipboard

error on- login redirection page phpbb3.3.5+nginx+php7.4

Open sreniv opened this issue 3 years ago • 9 comments

Hi, i am using phpbbseo for (phpbb3.3.5+nginx+php7.4) ubuntu os,

installed usu plugin working fine, but when user try to login from index homepage then its fine, but when user login from /forum-name (or) /forum-name/topic-name.html then after login its redirecting to an error page saying

Information The requested page could not be found.

Example:

user when click this below url to login

https://domain.com/ucp.php?mode=login&redirect=viewtopic.php%2Fgames%2Fhelo-t2.html%3Fforum_uri%3Dgames%26start%3D%26t%3D2

it will redirect him to page after login is below

https://domain.com/viewtopic.php/games/helo-t2.html?forum_uri=games&start=&t=2&sid=61e46405b4a8210607d941239333e1b5

but after login it give me error message

Information The requested page could not be found.

sreniv avatar Feb 07 '22 15:02 sreniv

@Dark1z

Hi my friend any idea?

meis2m avatar Feb 07 '22 17:02 meis2m

there is no enough information, are you able to provide real forum address? it could make diagnosis simpler

ser avatar Feb 07 '22 17:02 ser

there is no enough information, are you able to provide real forum address? it could make diagnosis simpler

testing here sir

https://v3n0m.xyz

sreniv avatar Feb 07 '22 17:02 sreniv

I don't see any errors in there indeed. everything looks fine

ser avatar Feb 08 '22 02:02 ser

I don't see any errors in there indeed. everything looks fine

https://v3n0m.xyz/ucp.php?mode=login&redirect=viewtopic.php%2Fgames%2Fhelo-t2.html%3Fforum_uri%3Dgames%26start%3D%26t%3D2 this link redirect u to the login page, please use this link to login u wil understand the actua problem sir user: demo password: 123456

sreniv avatar Feb 08 '22 07:02 sreniv

https://v3n0m.xyz/ucp.php?mode=login&redirect=viewtopic.php%2Fgames%2Fhelo-t2.html%3Fforum_uri%3Dgames%26start%3D%26t%3D2 this link redirect u to the login page, please use this link to login u wil understand the actua problem sir user: demo password: 123456

I can't see the error message too, as the user or password seems incorrect : "You have specified an incorrect username. Please check your username and try again. If you continue to have problems please contact the Board Administrator."

zetrader avatar Mar 10 '22 23:03 zetrader

I have the same problem here on a phpbb 3.3.7 with php 8.0. And I think the described bug is the same as in https://github.com/phpbb-seo/usu/issues/39 and https://github.com/phpbb-seo/usu/issues/45

So the problem is, that a "viewtopic.php/" is left in the redirection link, which should disappear. One can build a workaround with a redirection rule in nginx/Apache, but the extension should do the job.

wcz-txp avatar Jun 23 '22 11:06 wcz-txp

After playing around with one of these redirect links, it seems, that the problem is linked to the "sid removing". If I take the same link as mentioned above: https://domain.com/viewtopic.php/games/helo-t2.html?forum_uri=games&start=&t=2&sid=61e46405b4a8210607d941239333e1b5

and I remove the sid part, than the redirection is correctly made. And this concerns not only the login redirect. Any topic url with a "sid" will be wrongly redirected to something like "/viewtopic.php/..."

The same for forum links. Any forum url with a "sid" gets a redirect to "/viewforum.php/..."

For example: https://domain.com/forumname-f33.html?sid=7cab5e142f7eb27813475688ec677cfc is redirected by 301 to https://domain.com/viewforum.php/forumname-f33.html?f=33&start=

wcz-txp avatar Jun 23 '22 12:06 wcz-txp

Stupid workaround for nginx:

rewrite ^/(viewtopic|viewforum)\.php/(.+)$ /$2 permanent;

wcz-txp avatar Jun 24 '22 15:06 wcz-txp