I think that there is a problem with generating "X-WOPI-Proof" header. It works fine only for the 1st request. Then, it keeps returning the same value each time. I managed to solve it by tweaking the SignProof method (wsd/ProofKey.cpp): std::string Proof::SignProof(const std::vectorchar>& proof) const { assert(m_pKey); static Poco::Crypto::RSADigestEngine digestEngine(*m_pKey, "SHA256"); digestEngine.reset(); #this line fixed the issue digestEngine.update(proof.data(), proof.size()); return BytesToBase64(digestEngine.signature()); } I'm unsure if fully understand wopi proof key docs, so instead of creating a merge request, I submit this bug.
@Damian: nice catch! Please file a license statement as per https://wiki.documentfoundation.org/Development/GetInvolved#License_statement. I will prepare the patch for you. Thank you very much for your contribution!
https://gerrit.libreoffice.org/c/online/+/96899
Damian committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/online/commit/f160ccf80d46fda857a7cd4d87c036f61ef9df74 tdf#134041: reset engine before next digest computation
Damian: thank you!
Mike Kaganski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/online/commit/04709ab7fc37f25b33be54c84fc262bc8e79e646 tdf#134041: add a unit test