News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

User's having to make multiple log-in attempts

Started by tdennis, January 26, 2018, 04:17:17 PM

Previous topic - Next topic

tdennis

I hope someone can help me unravel what is causing this. I have several members that are complaining about not being able to login to my forum. What's so strange is that is they keep trying they eventually get in.

I tried to work with one user that seems to have this almost every-time he tries to login. When I look at the error log I see that his IP address is generating this error code when his log-in fails Unable to verify referring url. Please go back and try again.

Here is what I have found out with my own user id (admin) while trying to figure out what is going on. Reading other topic's with similiar problems I saw where using www in the url would cause this problem so I tried it with my own login using the system default theme (Curve):



Currently I have 42 pages of errors and I suspect about 75% of the total is like this. I think the ones with "guest" are from login attempts and those with user ids are attempts to logout (only "guests" on my sample photo):



What can I do to eliminate this problem. Evidently its been going on for a good while but most users just ignore it and keep trying to get logged in or continue viewing as a "guest". I can live with the errors but having members make numerous login attempts is a problem.

I am running SMF 2.0.15 and I have not modified anything related to solving this problem.
tdennis

Illori


landyvlad

Apparently some of my users are having  a similar issue. I am definitely using the curve theme.
Seems that for some of them (including an admin) they get the error first time, but second time is the charm.
I can't figure it out so far either.....

"Put as much effort into your question as you'd expect someone to give in an answer"

Please do not PM, IM or Email me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

Be the person your dog thinks you are.

aegersz

do all your URLs start without the "www" ?

I wonder if you try to run repair_settings.php (without taking any action) then are all the URLs uniform ?

if all else fails, perhaps try adding www to the URL to see what happens ... check your server settings also.

you may have an odd DNS issue somewhere and that might get around it.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Illori

the mod linked above should make things work without the manual file edit suggested in that topic.

tdennis

Nope, just checked to be sure
QuoteCurrent Theme:                           SMF Default Theme - Curve (change)


Quote from: Illori on January 26, 2018, 04:18:55 PM
you are actually using the core theme, not the curve theme. try installing https://custom.simplemachines.org/mods/index.php?mod=4167

tdennis

Since I always look for the easiest way, I will try installing the mod.
tdennis

Quote from: Illori on January 27, 2018, 06:06:11 AM
the mod linked above should make things work without the manual file edit suggested in that topic.

tdennis

OK, I tried to use package manager but there was a problem so I went ahead and did it manually. As soon as I added the new code I cleared my error log and tried to login with and without the www and I was able to login both ways with no problem.

I waited about 5 minutes and checked my error log and I have one entry with the "Unable to verify referring url. Please go back and try again" error. Not sure what caused this but I have a question.

When I entered the code manually (as shown below) The line "ob_start('ob_sessrewrite');" appears more than once but I only added the additional code after the first occurrence of "ob_start('ob_sessrewrite');" Is that correct? Or should it be added after each occurrence? As you might guess my last dealings with any type of programing was in the early 1980's!
Thanks
Dennis

QuoteFile Edits
./Sources/Subs.php
Find: [Select]

ob_start('ob_sessrewrite');

Add After: [Select]

ob_start('ob_sessrewrite');
      ob_start(function ($buffer) {
         global $context;
         if (!$context['user']['is_guest'])
            return $buffer;
         return preg_replace_callback('~(<form[^<]+action=login2(.+))</form>~iUs' . (!empty($context['utf8']) ? 'u' : ''), function($m) use ($context) {
               $repl = '';
               if (strpos($m[0], $context['session_var']) === false)
                  $repl .= '<input type="hidden" name="' . $context['session_var'] . '" value="' . $context['session_id'] . '"/>';

               return $m[1] . $repl . '</form>';
            }, $buffer);
      });


tdennis

Just checked my error log and between 4:19PM and 5:38PM I got 6 errors reported all with different IP addresses and all looking like this one:
Today at 05:38:57 PM
7b8e8c33252139bbcf013170144c270d
Type of error: User
URL  http://americanlongrifles.org/forum/index.php?action=login2
Unable to verify referring url. Please go back and try again

So it looks like I cleared up the problem with the URL using www but I still have the Unable to verify Referring UR problem.

Any thoughts?
Dennis

Sir Osis of Liver

As Illori pointed out, you are running Core theme, not Curve.  2.0.15 Core does not include session check that was added in 2.0.14.  Undo whatever edits you made to Subs.php, add the session check to Core theme index.template.php -



<input type="hidden" name="hash_passwrd" value="" />
<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '" />



Find first line, add second line as shown.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Aleksi "Lex" Kilpinen

The edit would seem to be done already, is the problem still there?
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

Advertisement: