summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-11-26 23:32:25 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-05-19 03:43:25 +0200
commit22a1632e58ab4a3e576b11d2ec7d386dfc5119a4 (patch)
tree6495879264c8cd666f8dbff58004a688a5da5b41 /desktop
parent7f67f05c9f7875d684d24bfb59aa8def150ac788 (diff)
handle errors returned by the server
Change-Id: I91808a017123501fa28cc9b7bfa7316f3d52b7df
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/updater.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx
index bccf6770d857..183ad8d9c8ae 100644
--- a/desktop/source/app/updater.cxx
+++ b/desktop/source/app/updater.cxx
@@ -314,6 +314,11 @@ update_info parse_response(const std::string& rResponse)
}
auto aRootKeys = aDocumentRoot.keys();
+ if (std::find(aRootKeys.begin(), aRootKeys.end(), "error") != aRootKeys.end())
+ {
+ throw invalid_update_info();
+ }
+
if (aRootKeys.size() != 5)
{
SAL_WARN("desktop.Update", "invalid root entries: " << rResponse);