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

Authentication error when uploading large file #1950

Closed
agners opened this issue Feb 26, 2013 · 9 comments
Closed

Authentication error when uploading large file #1950

agners opened this issue Feb 26, 2013 · 9 comments
Labels

Comments

@agners
Copy link

agners commented Feb 26, 2013

When uploading a larger file (in my case 180MiB which takes about 20 minutes) the upload ends with a yellow "Authentication error" message on top.

I did some more research. In lib/base.php the session id is regenerated periodically. Since ownCloud does the upload in one post request, the session Id isn't valid anymore when the actual upload is done! I raised the time in base.php from 15 minutes to 30 minutes, the upload then succeeded... So this session regeneration kinda limits the maximum upload size depending on your internet connection...

The issue #527 shows the same error, but technically its not the same problem I think.

I'm on current master (I checked, sessionHeartBeat is in js.js), I'm using Ubuntu Server 12.04 and Ubuntu 12.10 client, I can verify this with Chromium and Firefox.

@VicDeo
Copy link
Member

VicDeo commented Feb 26, 2013

@falstaff84 what DB engine do you use?

@agners
Copy link
Author

agners commented Feb 26, 2013

SQLite, also all other settings are pretty much standard...

@BernhardPosselt
Copy link
Contributor

Please paste your complete apache configuration and php.ini

@BernhardPosselt
Copy link
Contributor

Also can you join us in irc.freenode.net channel #owncloud to debug this problem together? I'm already having some ideas and i want to try them out

@BernhardPosselt
Copy link
Contributor

I think this line in lib/base.php causes the session to time out when the ajax heartbeat is being sent:

        // regenerate session id periodically to avoid session fixation
        if (!isset($_SESSION['SID_CREATED'])) {
            $_SESSION['SID_CREATED'] = time();
        } else if (time() - $_SESSION['SID_CREATED'] > 900) {
            session_regenerate_id(true);
            $_SESSION['SID_CREATED'] = time();
        }

Obvious solution would be to not regenerate the session id after 15 min but after 12 hours @LukasReschke

@BernhardPosselt
Copy link
Contributor

cc @karlitschek

@BernhardPosselt
Copy link
Contributor

@falstaff84 can you check if this fixes it for you?

@karlitschek
Copy link
Contributor

@LukasReschke 15min sounds too short. Can we extend this as @Raydiation sugests?

@BernhardPosselt
Copy link
Contributor

Please reopen if this isnt fixed by the above pull request.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants