diff options
author | Monroe Linden <monroe@lindenlab.com> | 2010-09-28 17:10:40 -0700 |
---|---|---|
committer | Monroe Linden <monroe@lindenlab.com> | 2010-09-28 17:10:40 -0700 |
commit | b2ebf4c245fa4b5024c6c2bee46c426ad58cb14c (patch) | |
tree | 066d4db8166bce749a8118d43e8e0bf56d1c4d7e | |
parent | 30dd09b8aece5a2d2ba05c0b16565fade8d2ed39 (diff) |
Add XML validation in LLNotifications when loading notifications.xml and notification_visibility.xml.
Reviewed by Richard.
-rw-r--r-- | indra/llui/llnotifications.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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<LLNotificationVisibilityRule::Params>::iterator it = params.rules.begin(), end_it = params.rules.end(); |