Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
8beabdc1
Commit
8beabdc1
authored
Aug 29, 2015
by
Byron Jones
Committed by
Frédéric Buclin
Aug 29, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1031035: xmlrpc can be DoS'd with billion laughs attack
r=LpSolit a=justdave
parent
79b334dc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
XMLRPC.pm
Bugzilla/WebService/Server/XMLRPC.pm
+9
-0
importxml.pl
importxml.pl
+3
-0
No files found.
Bugzilla/WebService/Server/XMLRPC.pm
View file @
8beabdc1
...
...
@@ -96,6 +96,15 @@ use Bugzilla::WebService::Constants qw(XMLRPC_CONTENT_TYPE_WHITELIST);
use
Bugzilla::WebService::
Util
qw(fix_credentials)
;
use
Scalar::
Util
qw(tainted)
;
sub
new
{
my
$self
=
shift
->
SUPER::
new
(
@_
);
# Initialise XML::Parser to not expand references to entities, to prevent DoS
require
XML::
Parser
;
my
$parser
=
XML::
Parser
->
new
(
NoExpand
=>
1
,
Handlers
=>
{
Default
=>
sub
{}
}
);
$self
->
{
_parser
}
->
parser
(
$parser
,
$parser
);
return
$self
;
}
sub
deserialize
{
my
$self
=
shift
;
...
...
importxml.pl
View file @
8beabdc1
...
...
@@ -1264,6 +1264,9 @@ my $twig = XML::Twig->new(
},
start_tag_handlers
=>
{
bugzilla
=>
\&
init
}
);
# Prevent DoS using the billion laughs attack.
$twig
->
{
NoExpand
}
=
1
;
$twig
->
parse
(
$xml
);
my
$root
=
$twig
->
root
;
my
$maintainer
=
$root
->
{
'att'
}
->
{
'maintainer'
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment