From b2ebf4c245fa4b5024c6c2bee46c426ad58cb14c Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Tue, 28 Sep 2010 17:10:40 -0700 Subject: Add XML validation in LLNotifications when loading notifications.xml and notification_visibility.xml. Reviewed by Richard. --- indra/llui/llnotifications.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 46af9323e1..6e1f574935 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1367,6 +1367,12 @@ bool LLNotifications::loadTemplates() LLNotificationTemplate::Notifications params; LLXUIParser parser; parser.readXUI(root, params, full_filename); + + if(!params.validateBlock()) + { + llerrs << "Problem reading UI Notifications file: " << full_filename << llendl; + return false; + } mTemplates.clear(); @@ -1435,6 +1441,12 @@ bool LLNotifications::loadVisibilityRules() LLXUIParser parser; parser.readXUI(root, params, full_filename); + if(!params.validateBlock()) + { + llerrs << "Problem reading UI Notification Visibility Rules file: " << full_filename << llendl; + return false; + } + mVisibilityRules.clear(); for(LLInitParam::ParamIterator::iterator it = params.rules.begin(), end_it = params.rules.end(); -- cgit v1.2.3