#641

PHP session management and multiple tabs/windows per browser

    • Status: Deferred
    • Priority: High (2)
    • Component: -
    • Estimate: None/Small/Medium/Large None
    • type of feature: -
    • Fixed in: -
    Current workflow depends partly (a.o. for voucher uploads) on PHP session specific variables. Since a PHP session is browser specific and cannot (without extrs measures) distinguish between actions done from different browser tabs or windows this will 'break'for example simultaneous voucher uploads (multiple uploads using a voucher from the same browser session at the same time). We might need extra code to generate a window/tab specific identifier that can be used to separate actions. See a.o. http://www.php.net/manual/en/ref.session.php#74557
  • Followers
     
    Ico-users ricoshae (Assigned To) , Wendy Mason , Xander Jansen , gijzelaerr 
     
    Attachments
    No attachments
    Associations
     
    # Relation Summary Status Action
    Activity
     
    User picture

          on Feb 22, 2012 @ 11:59am UTC * By Jan Meijer

    Priority changed from Normal (3) to Highest (1)
    User picture

          on Feb 29, 2012 @ 10:48am UTC * By ricoshae

    Priority changed from Highest (1) to Normal (3)
    User picture

          on Feb 29, 2012 @ 10:49am UTC * By ricoshae

    Priority changed from Normal (3) to Highest (1)
    User picture

          on Feb 29, 2012 @ 10:49am UTC * By Jan Meijer

    Priority changed from Highest (1) to High (2)
    User picture

          on Feb 29, 2012 @ 10:50am UTC * By Jan Meijer

    Priority changed from High (2) to Highest (1)
    User picture

          on Feb 29, 2012 @ 12:20pm UTC * By Jan Meijer

    Status changed from New to In Progress
    User picture

          on Mar 01, 2012 @ 07:32am UTC * By Xander Jansen

    Status changed from In Progress to Accepted
    Updating tickets (#421, #488, #520, #572, #617, #618, #623, #628, #629, #630, #631, #641, #645, #648, #654, #657)
    User picture

          on Mar 06, 2012 @ 12:25pm UTC * By Jan Meijer

    The current semantics for a guest-upload-voucher is that it can be used to upload one file. This needs to work at the same time as "pause/resume" needs to work.

    After todays conference call the following solution was proposed: A guest-upload-voucher does not use the FileUID field. We will use this FileUID field to link a guest-upload-voucher to a pending-upload-entry. That way we can recognise an upload voucher is already in use, when dealing with a pause/resume situation, a new upload is started in a separate tab etc.

    This will be combined with two checks:
    -before upload check whether the file-to-upload already is being uploaded (=present in the pending entries): ticket #663
    -after upload check whether the filesize on the server is the same as filesize of file when sent (crude checksum): ticket 629

    When uploading using a guest-upload-voucher the following happens:

    -User logs on with voucher
    -Starts upload
    -Pending entry is created in database
    -Voucher entry updated with FileUID containing pending_entry_ID (stored in
    filevoucheruid for pending entries)

    On complete, the voucher is closed, the pending entry is moved to a "uploaded" state

    If an attemptis made to use a voucher with an existing value in FileUID, it will be a resume (if pending_entry_id is the same) or undesired use (trying to upload the same file twice) or use that does not comply with current guest-voucher semantics: multiple transactions with the same guest-voucher.

    Upload of same file twice at same time will result in a corrupt file on the server. By checking the filesize on receipt (see ticket #629) we can display an error "Something went wrong, the file is a different size..., did you maybe upload the same file in multiple browser windows?"

    Once this solution is implemented we need to do the multiple-uploads mutliple-tabs check again.

    Note that we will probably have to revisit this solution when implementing multiple-file-in-one-transaction upload
    User picture

          on Mar 06, 2012 @ 12:48pm UTC * By ricoshae

    Status changed from Accepted to In Progress
    User picture

          on Mar 13, 2012 @ 10:41am UTC * By Jan Meijer

    Priority changed from Highest (1) to High (2)
    Status changed from In Progress to Deferred
    User picture

          on Mar 13, 2012 @ 10:44am UTC * By Jan Meijer

    After 1 week of fix attempts it turns out this requires more changes to code than we're willing to do at the moment (might risk delays in 1.5 shipping). Given that the problem is already there in FileSender 1.1, vouchers are used but not that often, this is a corner case and a filesize check in the end provides a crude anticorruption check, this one will be postponed until after 1.5 most likely.

    It's not unlikely we'll fold this one in the work to be done for implementing multiple files.

    Chris wil upload current attempts at fixing this into playground directories in SVN.
    User picture

          on Apr 25, 2012 @ 11:34am UTC * By Xander Jansen

    Planned for release changed from 1.5-beta2 to -none-
    Time Expenditure
    Loading