[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/src wsd/LOOLWSD.cpp wsd/Storage.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Mon May 22 10:53:31 UTC 2017
loleaflet/src/core/Socket.js | 1 +
wsd/LOOLWSD.cpp | 7 +++++++
wsd/Storage.cpp | 4 ++--
3 files changed, 10 insertions(+), 2 deletions(-)
New commits:
commit 1516abf11927b8be3abf1c3e1a4d7285ddebfec0
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Mon May 22 00:26:07 2017 -0400
Hide connecting spinner on authorization failure
Also, fix regression resulting in "This is embarrassing..."
instead of "Unauthorized..." message.
Change-Id: If6219bfbc445b186bb4064b3f20a0ccd2854d617
Reviewed-on: https://gerrit.libreoffice.org/37893
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
(cherry picked from commit 4e6fee5407219371945edf2ec49b90a333a8311d)
Reviewed-on: https://gerrit.libreoffice.org/37895
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/loleaflet/src/core/Socket.js b/loleaflet/src/core/Socket.js
index e165ee71..4165e0c5 100644
--- a/loleaflet/src/core/Socket.js
+++ b/loleaflet/src/core/Socket.js
@@ -326,6 +326,7 @@ L.Socket = L.Class.extend({
this._map.fire('error', {msg: errorMessages.diskfull});
}
else if (command.errorKind === 'unauthorized') {
+ this._map.hideBusy();
this._map.fire('error', {msg: errorMessages.unauthorized});
}
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index d7179ab2..03ed228f 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2108,6 +2108,13 @@ private:
// Add and load the session.
docBroker->addSession(clientSession);
}
+ catch (const UnauthorizedRequestException& exc)
+ {
+ LOG_ERR("Unauthorized Request while loading session for " << docBroker->getDocKey() << ": " << exc.what());
+ const std::string msg = "error: cmd=internal kind=unauthorized";
+ clientSession->sendMessage(msg);
+ docBroker->stop();
+ }
catch (const std::exception& exc)
{
LOG_ERR("Error while handling loading : " << exc.what());
diff --git a/wsd/Storage.cpp b/wsd/Storage.cpp
index d0c3d3f4..3c800535 100644
--- a/wsd/Storage.cpp
+++ b/wsd/Storage.cpp
@@ -445,7 +445,7 @@ std::unique_ptr<WopiStorage::WOPIFileInfo> WopiStorage::getWOPIFileInfo(const st
}
catch(const Poco::Exception& pexc)
{
- LOG_ERR("Cannot get file info from WOPI storage uri [" + uriObject.toString() + "]. Error: " << pexc.displayText() <<
+ LOG_ERR("Cannot get file info from WOPI storage uri [" << uriObject.toString() << "]. Error: " << pexc.displayText() <<
(pexc.nested() ? " (" + pexc.nested()->displayText() + ")" : ""));
throw;
}
@@ -494,7 +494,7 @@ std::unique_ptr<WopiStorage::WOPIFileInfo> WopiStorage::getWOPIFileInfo(const st
else
{
LOG_ERR("WOPI::CheckFileInfo failed and no JSON payload returned. Access denied.");
- throw UnauthorizedRequestException("Access denied.");
+ throw UnauthorizedRequestException("Access denied. WOPI::CheckFileInfo failed on: " + uriObject.toString());
}
Poco::Timestamp modifiedTime = Poco::Timestamp::fromEpochTime(0);
More information about the Libreoffice-commits
mailing list