mellivora icon indicating copy to clipboard operation
mellivora copied to clipboard

admin getting logged out.

Open avi7611 opened this issue 5 years ago • 4 comments

i made a admin user, but when trying to edit a preexisting challenge or trying to go into admin section after 1-2 minutes, i'm being redirected to home page, and getting logged out when i try to save changes, any idea what could be messed up ? i have no unusual activities in my apache logs. ps:- Tried to remove all users and they created new admin user, problem was solved but again its same now after 3-4 time logging in.

avi7611 avatar Jan 25 '20 07:01 avi7611

Have you checked the admin exceptions log? If you can't access through the UI, then you can check the exceptions table in the database.

The only thing I can think of that might be logging you out is if your IP keeps changing. If the IP changes the login session will be invalidated.

Nakiami avatar Jan 26 '20 01:01 Nakiami

the exception log is empty, my ip is stable and static, can you tell me how do i disable the ip management kicking out feature, so that it does't kick me out of session. cause i have a CTF in my university coming up this tuesday.

avi7611 avatar Jan 26 '20 14:01 avi7611

An invalid cookie token was used. Cookie likely stolen. TS: 4R3p983+qrrKm1mF 2020-01-26 14:12:49 N/A 157.39.1*.**
#0 /var/www/mellivora/include/session.inc.php(72): login_session_create_from_login_cookie() #1 /var/www/mellivora/htdocs/home.php(5): login_session_refresh() #2 {main}

well, i made a new user a moderator and this popped up in exception logs. i used * to hide my ip in this comment

avi7611 avatar Jan 26 '20 14:01 avi7611

Hm. That means your session has been closed and for some reason the content in your remember-me cookie or database have diverged. Have you been dropping the database manually?

Try resetting the cookie_tokens table. Then delete all your cookies set by mellivora.

I still think the root of the issue may be a varying IP. If it is, you could try to make the get_fingerprint() method in include/session.inc.php (https://github.com/Nakiami/mellivora/blob/master/include/session.inc.php#L379) return an empty string.

Nakiami avatar Jan 26 '20 21:01 Nakiami