Curious message when trying to log in

Started by kikashi, July 02, 2025, 11:49:29 AM

Previous topic - Next topic

kikashi

I've just set up a new installation. Several people have reported getting this message when trying to log in.

Unable to verify referring URL. Please go back and try again.

Sometimes, they can fix it by changing browser (Safari to Chrome, for example). Other times, it goes away after a while.

What's causing it, and can I fix it?

Jeremy

Aleksi "Lex" Kilpinen

Most probably, your forum can be accessed using more than one URL, and you access the forum using a different URL than the one configured in SMF.

For example, your forum may be accessible both using www and without www in the address - and SMF really needs you to choose. So, if you want to use www, make sure ALL urls configured in SMF use www, and then redirect all traffic from other URL variations to www, so that you always stick to the one.

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Sir Osis of Liver

Put this in .htaccess in forum root -


# 301 REDIRECT HTTP TO HTTPS AND WWW TO NON-WWW
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]
</IfModule>


When in Emor, do as the Snamors.
                              - D. Lister

Aleksi "Lex" Kilpinen

Do make sure it does what you want, and matches your selection in SMF though. If that redirects from www to non-www, and SMF does the reverse, you have an infinite loop and your site will quite literally die.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

bonbec

Quote from: kikashi on July 02, 2025, 11:49:29 AM... Unable to verify referring URL. Please go back and try again. ...
I have the same problem with the 2.1.6 version (I did the upgrades 2.1.5 and 2.1.6)
But I find this errors in the trace info :

Type d'erreur
User
Message d'erreur
Impossible de vérifier l'adresse référente. Merci de revenir en arrière et de réessayer.
URL de la page causant l'erreur
hxxp:forum.espacetrain.com/index.php?action=likes;sa=view;ltype=msg;like=53097;ee0c2ee51c=24c48f551f3d509b66a5395b6853e06f [nonactive]
Informations de traçage

    #0: fatal_lang_error()
    Appelé depuis /xxxx/xxxx/xxxx/forum.espacetrain.com/Sources/Security.php à la ligne 710
    #1: checkSession()
    Appelé depuis /xxxx/xxxx/xxxx/forum.espacetrain.com/Sources/Likes.php à la ligne 152
    #2: call()
    Appelé depuis /xxxx/xxxx/xxxx/forum.espacetrain.com/index.php à la ligne 185


Aleksi "Lex" Kilpinen

Not the same issue, not related to login. See SMF 2.1.6 errors for more information.
If after that you still need assistance, open your own topic.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

kikashi

Quote from: Aleksi "Lex" Kilpinen on July 02, 2025, 01:10:04 PMDo make sure it does what you want, and matches your selection in SMF though. If that redirects from www to non-www, and SMF does the reverse, you have an infinite loop and your site will quite literally die.

Thanks, both. I have verified that the problem arises when the www. prefix is used. I'll create the .htaccess file, as suggested, but before I do, how do I check whether "SMF does the reverse"? Where do I look?

Jeremy

Aleksi "Lex" Kilpinen

Easiest way, use repair settings to see all relevant URL settings at once

What is repair_settings.php?
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

kikashi

I have downloaded repair_settings.php from the link you kindly supplied, and uploaded it to my site, placing it as instructed next to Settings.php. When I point my browser at the file, it just dumps its text. I've tried enabling the execute flags but it makes no difference.

I must be missing something. Apologies if I'm just being dim.

Jeremy

Sir Osis of Liver

#9
That's odd, if you link to this -

repair_settings.php at your site

 it just reloads the forum.  If repair_settings is in forum root, it should load, if it's not you should get 404.
When in Emor, do as the Snamors.
                              - D. Lister

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

When in Emor, do as the Snamors.
                              - D. Lister

kikashi

I can't get the repair_settings.php to work on my site, although I readily concede the link SOoL posted works just fine.

So I took the risk and created a .htaccess, as suggested, on the assumption that if disaster struck I could use ftp to delete it.

The problem appears to be solved. Thanks for your help.

Jeremy

PS: the captcha verification on this site is ludicrously intrusive and time-consuming

Advertisement: