Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Logging in as each other
#1
I'm getting reports from my forum users that when they log in they are logged in "as if they were another user". I don't have much detail but clearly quite concerning.


I'm running the latest version of MyBB.

Recently the sessions table has been causing an error - it seems to need to be repaired roughly once a week.

I've tried deleting all the rows from the sessions table in an attempt to find a permanent fix the problem with the sessions table needing to be rebuilt. That said, I don't think deleting the rows in the sessions table should cause people to be given another person's profile when they log in.


Does any of this ring any bells?


I'm technically competent but I have limited knowledge of the MyBB system. Can anyone point me in the right direction please?
Reply
#2
Do you have some sort of webserver cache? Varnish, etc? Sounds like it's caching PHP pages and serving them to other users.
No longer involved in the MyBB project.
Reply
#3
(06-06-2019, 10:45 AM)Nathan Malcolm Wrote: Do you have some sort of webserver cache? Varnish, etc? Sounds like it's caching PHP pages and serving them to other users.


Good question Nathan, but no caching.
Reply
#4
That's generally been the case in the past with this issue. I'd definitely recommend double checking.
No longer involved in the MyBB project.
Reply
#5
Is anyone able to give me a quick overview of what happens when someone logs in please?

I'm happy to receive answers by DM if there are any security concerns but presumably the system should be secure...
Reply
#6
try using Send No Cache Headers at Server and Optimization Options of Configuration section
Reply
#7
OK, a bit more info.

It appears that users ARE logged in correctly.  However, the text near the top of the screen where is says this

Hello There, Guest! Login Register

...is misleading.

The text "Hello there, <username>" changes from page to page.

Initially it correctly shows my username but when I move to another page the username displayed changes to either another username or to "Guest!".


Not as serious as people being logged in as each other but still very misleading and not good for confidence in the forum software.

Does that jog anyone's memory for a cause of this issue?...

Looking at the code

The header_welcomeblock_member template displays this: {$lang->welcome_logout}
which is defined as

$lang->welcome_back = $lang->sprintf($lang->welcome_back, $mybb->user['username'], $lastvisit); in the global.php file

So $mybb->user['username'] is being populated incorrectly.

Thoughts...?
Reply
#8
^ basically the issue is related to aggressive cache & cookie setting (stored through browser)
you can also try this .htaccess method
Reply
#9
That may well be it. Just waiting for some feedback.

Why would my browser know anything about another user's username?
Reply
#10
^ that comes from some weird cache set at web server !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)