-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
"Stay logged in" checkbox doesn't work #26027
Comments
Indeed, seems broken even in 9.1.1RC1. Also doesn't work in 9.0.5RC1, 9.0.4. My steps:
ExpectedLogin remembered ActualLogin page is back. Regression from 8.2 |
Trying to bisect this... very difficult. In some cases when I thought a commit is broken, the next time I try it, it works again. Now trying again and being more careful about every action. Clear cookies, which URL I open after reopening the browser, etc. |
Okay, bisect says that this commit 6f4712a is the breaking one. |
and this doesn't make any sense at all! The commit doesn't even look related 😞 |
There is something very fishy about this commit. I tried the following:
So this means the commit as displayed in github doesn't affect it. But it seems to be attached to other potential changes... |
RACE CONDITION....... I see two requests arriving at the server, both with the same "remember me" cookie. If I go through the two requests slowly with a debugger in a way that makes them work sequentially, the "remember me" does work. This is only rough guessed info, will need more debugging. |
Added some debugging, here we can see the requests:
They indeed both arrive with the same "oc_token". |
Ohhhh, now I know why Chromium is sending two requests and why I was getting random results... Every time I reopened Chromium, I typed the letter L "l" which would find "http://localhost/owncloud" in the history and auto-select it as URL. But now before I even hit enter, Chromium already sends a request to the server with the cookie... And in most of my tests, I hit enter very quickly so it would re-send a second request with the same payload... |
ah, and additionally the "redirect" was received by the first call, the one from the address bar. And since the second call's cookie is rejected, instead of reusing whichever session was just created by the other one, it fails. Now the question is whether we can make the second request use the session from the first one... It might not even be possible because the second request started before the first one returned, so there is no session cookie yet. Ah, what a nightmare! |
@zkvvoob can you ask the users who have the issue to try with Firefox instead ? Goal is to find out whether the issue you are having is exactly what I described. Firefox doesn't do an extra request. |
@zkvvoob another way is that whenever the user types or copies the URL in the address bar, instead of hitting "enter" directly, wait a second or two... then hit enter. @zkvvoob do you have more information about the exact workflow how ownCloud is being reopened after being closed. Is it a bookmark ? Or typed in address bar ? Or a tab that reopens upon restore ? |
I checked the request headers, but there seems to be no way to distinguish Chrome's address bar request from the real open, so we can't discard the first request. 😦 |
Just played a bit more in Firefox: made sure it keeps cookies for a few In 99% of the cases everyone here uses a bookmark to open OC. Very rarely 2016-09-06 20:15 GMT+03:00 Vincent Petry [email protected]:
|
I was actually testing on v9.0.5RC1 / stable9. Now I just tried on v9.1.0 and indeed it's completely broken. |
@PVince81 it's gone, unfortunately. I probably refactored it away while working on the auth stuff 🙈 🙊 |
Same problem over here, doesn't work either with Safari or Chromium. |
Disclaimer: I was trying to find a different bug but ended up reading this. I had a weird cookie issue that ended up being related to cookie size limits. They are different in Chrome and Firefox. Chrome has 4096 bytes per cookie limit while firefox limits are much higher. Just thought of mentioning this as this may be related. |
@ChristophWurst any chance to bring it back ? |
@PVince81 It seems @ChristophWurst is working at nextcloud/server#1347 |
I usually just log in via the equivalent of the run dialog, no bookmark, history or anything and I am using internet explorer and its completely broke using 9.1.0. |
We can't reuse their code due to licensing issues... ok then will need to reimplement it ourselves here. |
@PVince81 Sure, i know. But maybe @ChristophWurst is providing the code changes with a different license as implementing something broken and then don't fix it doesn't look like a good move to me. |
@pmaier1 |
Hey, this issue has been closed because the label (This is an automated comment from GitMate.io.) |
@DeepDiver1975 I heard you had some ideas how to bring it back ? |
If you're using Apache, you can work around the cookie lifetime issue with something like:
Note that I'm still on 9.1 |
"Stay logged in" checkbox is no longer available in oC 10.1. |
Hello,
Ever since I updated my OC to v. 9.1, every user has had to login every time they close a browser. Now, I do have a 2FA (Google Authenticator) enabled, but only for the admin user. The behaviour in question affects everyone - but only in the browser, obviously - using an an app (say OC News reader on Android) is fine.
None of the browsers is set to clear cookies on exit, no other websites which preserve logins are affected. Tried under Chrome, Firefox and Opera.
Hope the information below is enough. If you need anything else, just let me know.
Steps to reproduce
Expected behaviour
The requested page loads straight away
Actual behaviour
Login prompt appears with the following address:
/login?redirect_url=%252Fo%252Fapps%252Fnews
Server configuration
Operating system: Ubuntu 14.04.2 LTS
Web server: Apache/2.4.12
Database: MySQL
PHP version: 5.6.23
ownCloud version: 9.1.0 Stable
Updated from an older ownCloud or fresh install: 9.0.3
Where did you install ownCloud from: owncloud.org
Signing status (ownCloud 9.0 and above):
List of activated apps:
The content of config/config.php:
Are you using external storage, if yes which one: No
Are you using encryption: No
Are you using an external user-backend, if yes which one: No
LDAP configuration (delete this part if not used)
Client configuration
Browser: Google Chrome 52.0.2743.116 m (64-bit), Mozilla Firefox 47.0.1
Operating system: Windows 8.1
Logs
Web server error log
ownCloud log (data/owncloud.log)
Browser log
The text was updated successfully, but these errors were encountered: