Champs-Libres / wopi-lib

A standard and framework agnostic PHP library to facilitate the implementation of the WOPI protocol.
https://github.com/champs-libres
MIT License
12 stars 1 forks source link

The lock does not last 30 minutes, as expected by Wopi protocol #21

Closed julienfastre closed 2 years ago

julienfastre commented 2 years ago

Steps required to reproduce the problem

  1. open a document in editor, in a symfony app when the duration of default cache 300 seconds
  2. wait for a duration which is more than 300 seconds
  3. edit the document
  4. try to save it

Expected Result

Actual Result

julienfastre commented 2 years ago

The wopi protocols says that the lock should last at least 30 minutes:

https://docs.microsoft.com/en-us/microsoft-365/cloud-storage-partner-program/rest/concepts#lock

Therefore, WOPI locks must:

  • Be associated with a single file.

  • Contain a lock ID of maximum length 1024 ASCII characters.

  • Prevent all changes to that file unless a proper lock ID is provided.

  • Expire after 30 minutes unless refreshed (see RefreshLock).