]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1031035: xmlrpc can be DoS'd with billion laughs attack
authorByron Jones <glob@mozilla.com>
Tue, 14 Apr 2015 16:36:17 +0000 (00:36 +0800)
committerByron Jones <glob@mozilla.com>
Tue, 14 Apr 2015 16:36:17 +0000 (00:36 +0800)
r=LpSolit,a=glob

Bugzilla/WebService/Server/XMLRPC.pm

index 03d93b597758265cb42c49a7ebec484302742dcc..c28c3e10cbbc995faae9599663326c9104ec104a 100644 (file)
@@ -138,7 +138,8 @@ sub new {
     my $self = shift->SUPER::new(@_);
     # Initialise XML::Parser to not expand references to entities, to prevent DoS
     require XML::Parser;
-    $self->{_parser}->parser(parser => XML::Parser->new( NoExpand => 1, Handlers => { Default => sub {} } ));
+    my $parser = XML::Parser->new( NoExpand => 1, Handlers => { Default => sub {} } );
+    $self->{_parser}->parser($parser, $parser);
     return $self;
 }