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

Fix login link race condition #960

Merged
merged 1 commit into from Feb 16, 2016

Conversation

Projects
None yet
2 participants
@mfairchild365
Copy link
Contributor

mfairchild365 commented Feb 12, 2016

It looks like there was a race condition. Website can set the login URL with JS, which will also cause displayLogin() to be called. displayLogin() would remove the .loggedin class from IDM container (but not remove the profile image, etc). This would cause weird styling.

If a user is already logged in, the displayLogin() method should never be called, so prevent it from doing anything.

Fix login link race condition
It looks like there was a race condition. Website can set the login URL with JS, which will also cause `displayLogin()` to be called. `displayLogin()` would remove the ``.loggedin` class from IDM container (but not remove the profile image, etc).  This would cause weird styling.

If a user is already logged in, the `displayLogin()` method should never be called, so prevent it from doing anything.

kabel added a commit that referenced this pull request Feb 16, 2016

Merge pull request #960 from mfairchild365/fix-login-link
Fix login link race condition

@kabel kabel merged commit 0442c69 into unl:develop Feb 16, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@mfairchild365 mfairchild365 deleted the mfairchild365:fix-login-link branch May 18, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment