Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remember me fatal error #8104

Closed
brettp opened this issue Mar 24, 2015 · 9 comments

Comments

@brettp
Copy link
Member

commented Mar 24, 2015

Just tried logging into the community site clicking "Remember me" and got this error:

Duplicate entry 'XXX' for key 'PRIMARY'

QUERY:
INSERT INTO elggusers_remember_me_cookies (code, guid, timestamp)
VALUES ('XXX', 11814, 1427204361)

@brettp brettp added the critical label Mar 24, 2015
@mrclay

This comment has been minimized.

Copy link
Member

commented Mar 24, 2015

So you already had a matching cookie yet it didn't log you in...or it tried the insert twice for some reason.

@mrclay

This comment has been minimized.

Copy link
Member

commented Mar 24, 2015

In any case we probably want try/catch around any inserts on tables with constraints.

@mrclay

This comment has been minimized.

Copy link
Member

commented Mar 24, 2015

can you find/recover the existing row? The timestamp would help

@brettp

This comment has been minimized.

Copy link
Member Author

commented Mar 24, 2015

It's an empty set. I was logging in from a second browser, if that would make a difference.

@brettp

This comment has been minimized.

Copy link
Member Author

commented Mar 26, 2015

This happened again. The error ts is 1427390200, the existing row's ts is: 1425122849.

@mrclay

This comment has been minimized.

Copy link
Member

commented Mar 27, 2015

Is it possible in both cases that the browser you were using to log in already had an old elggperm (remember me) cookie? Or were these definitely new sessions/incognito? It may be too hard to debug the root cause of this; if I can't find it easily I may just throw in a delete for existing code.

@brettp

This comment has been minimized.

Copy link
Member Author

commented Mar 27, 2015

These were on different computers completely, but I had logged into
Community before on both, so a cookie might have been set. On the one that
threw the error, it looked like my session had timed out, because I didn't
manually log out.

On Fri, Mar 27, 2015 at 2:07 PM, Steve Clay notifications@github.com
wrote:

Is it possible in both cases that the browser you were using to log in
already had an old elggperm (remember me) cookie? Or were these definitely
new sessions/incognito? It may be too hard to debug the root cause of this;
if I can't find it easily I may just throw in a delete for existing code.


Reply to this email directly or view it on GitHub
#8104 (comment).

Brett Profitt
Elgg Lead Developer

Elgg: http://elgg.org/
Skype: brett.profitt
Twitter: http://twitter.com/brettprofitt

@mrclay

This comment has been minimized.

Copy link
Member

commented May 12, 2015

Simplest fix I can think of #8303

mrclay added a commit to mrclay/Elgg-leaf that referenced this issue May 12, 2015
@jdalsem jdalsem closed this May 20, 2015
mrclay added a commit to mrclay/Elgg-leaf that referenced this issue Jul 14, 2015
This reverts Elgg#8303 in the hope that this will stop users from being
automatically logged into other users’ accounts. This will reintroduce
bug Elgg#8104, which must be fixed another way.

Fixes Elgg#8736
mrclay added a commit to mrclay/Elgg-leaf that referenced this issue Jul 14, 2015
This reverts Elgg#8303 in the hope that this will stop users from being
automatically logged into other users’ accounts. This will reintroduce
bug Elgg#8104, which must be fixed another way.

Fixes Elgg#8736
@mrclay

This comment has been minimized.

Copy link
Member

commented Jul 15, 2015

I now notice the better fix would be to get rid of the unnecessary unique key on the column users_remember_me_cookies.timestamp. Oops, no. The errors were due to duplicate code values.

mrclay added a commit to mrclay/Elgg-leaf that referenced this issue Jul 16, 2015
This reverts Elgg#8303 in the hope that this will stop users from being
automatically logged into other users’ accounts. This will reintroduce
bug Elgg#8104, which must be fixed another way.

Currently it's undetermined if any sites other than community.elgg.org
are affected by either bug.

Fixes Elgg#8736
mrclay added a commit to mrclay/Elgg-leaf that referenced this issue Jul 16, 2015
This reverts Elgg#8303 in the hope that this will stop users from being
automatically logged into other users’ accounts. This will reintroduce
bug Elgg#8104, which must be fixed another way.

Currently it's undetermined if any sites other than community.elgg.org
are affected by either bug.

Fixes Elgg#8736
mrclay added a commit to mrclay/Elgg-leaf that referenced this issue Jul 16, 2015
It’s unconfirmed that Elgg#8104 affects any server other than community.elgg.org.

Fixes Elgg#8104
mrclay added a commit to mrclay/Elgg-leaf that referenced this issue Jul 16, 2015
It’s unconfirmed that Elgg#8104 affects any server other than community.elgg.org.

Fixes Elgg#8104
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.