diff options
| author | 2012-02-08 04:46:51 +0000 | |
|---|---|---|
| committer | 2012-02-08 04:46:51 +0000 | |
| commit | 6ba39c3f02bdb37ab9b168e76265ad45b9c7a68c (patch) | |
| tree | 299a2ce75c67a9a0f298b588a2ec5b4c335de103 /modules | |
| parent | f835fcb3a67eb008090b78cdfbd30338b7342a4e (diff) | |
escape high ascii when writing channels.xml (useful due to xchat exploit rule)
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/xml.pl | 11 |
1 files changed, 5 insertions, 6 deletions
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 { |
