From 6ba39c3f02bdb37ab9b168e76265ad45b9c7a68c Mon Sep 17 00:00:00 2001 From: William Heimbigner Date: Wed, 8 Feb 2012 04:46:51 +0000 Subject: escape high ascii when writing channels.xml (useful due to xchat exploit rule) --- modules/xml.pl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'modules/xml.pl') diff --git a/modules/xml.pl b/modules/xml.pl index 30b5f30..dbe4365 100644 --- a/modules/xml.pl +++ b/modules/xml.pl @@ -19,19 +19,18 @@ sub readXML { } sub writeXML { - my ( $p ) = $::cset; $::xs1->XMLout($::settings, RootName => 'settings', KeyAttr => ['id'], GroupTags => { altnicks => 'altnick', server => 'host', autojoins => 'autojoin' }, ValueAttr => { debug => 'content', nick => 'content', port => 'content', realname => 'content', username => 'content', dir => 'content', - zone => 'content', filefmt => 'content', timefmt => 'content'}) > io("$p/settings.xml"); - $::xs1->XMLout($::channels, RootName => 'channels', KeyAttr => ['id']) > io("$p/channels.xml"); - $::xs1->XMLout($::users, RootName => 'people', KeyAttr => ['id']) > io("$p/users.xml"); - $::xs1->XMLout($::commands, RootName => 'commands', KeyAttr => ['id']) > io("$p/commands.xml"); + zone => 'content', filefmt => 'content', timefmt => 'content'}) > io("$::cset/settings.xml"); + $::xs1->XMLout($::channels, RootName => 'channels', KeyAttr => ['id'], NumericEscape => 2) > io("$::cset/channels.xml"); + $::xs1->XMLout($::users, RootName => 'people', KeyAttr => ['id']) > io("$::cset/users.xml"); + $::xs1->XMLout($::commands, RootName => 'commands', KeyAttr => ['id']) > io("$::cset/commands.xml"); } sub writeChannels { - $::xs1->XMLout($::channels, RootName => 'channels', KeyAttr => ['id']) > io("$::cset/channels.xml"); + $::xs1->XMLout($::channels, RootName => 'channels', KeyAttr => ['id'], NumericEscape => 2) > io("$::cset/channels.xml"); } sub writeUsers { -- cgit v1.2.3