From 22a1632e58ab4a3e576b11d2ec7d386dfc5119a4 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sat, 26 Nov 2016 23:32:25 +0100 Subject: handle errors returned by the server Change-Id: I91808a017123501fa28cc9b7bfa7316f3d52b7df --- desktop/source/app/updater.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'desktop') 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); -- cgit