summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService/Constants.pm
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-02-22 16:38:20 +0100
committerDave Lawrence <dlawrence@mozilla.com>2012-02-22 16:38:20 +0100
commit69ad536a55aaa58bfd4cb68578061dd5efe5b84d (patch)
tree5915dfacba496980a5376cfc5ee6b2937734f3df /Bugzilla/WebService/Constants.pm
parente00513c9a718d79fcd9b9bfd67a5938380519e10 (diff)
downloadbugzilla-69ad536a55aaa58bfd4cb68578061dd5efe5b84d.tar.gz
bugzilla-69ad536a55aaa58bfd4cb68578061dd5efe5b84d.tar.xz
Bug 725663 - (CVE-2012-0453) [SECURITY] CSRF vulnerability in the XML-RPC API when using mod_perl
r/a=LpSolit
Diffstat (limited to 'Bugzilla/WebService/Constants.pm')
-rw-r--r--Bugzilla/WebService/Constants.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/Bugzilla/WebService/Constants.pm b/Bugzilla/WebService/Constants.pm
index ab3111eed..59aab9b55 100644
--- a/Bugzilla/WebService/Constants.pm
+++ b/Bugzilla/WebService/Constants.pm
@@ -24,6 +24,7 @@ our @EXPORT = qw(
WS_ERROR_CODE
ERROR_UNKNOWN_FATAL
ERROR_UNKNOWN_TRANSIENT
+ XMLRPC_CONTENT_TYPE_WHITELIST
WS_DISPATCH
);
@@ -172,6 +173,8 @@ use constant WS_ERROR_CODE => {
unknown_method => -32601,
json_rpc_post_only => 32610,
json_rpc_invalid_callback => 32611,
+ xmlrpc_illegal_content_type => 32612,
+ json_rpc_illegal_content_type => 32613,
};
# These are the fallback defaults for errors not in ERROR_CODE.
@@ -180,6 +183,11 @@ use constant ERROR_UNKNOWN_TRANSIENT => 32000;
use constant ERROR_GENERAL => 999;
+use constant XMLRPC_CONTENT_TYPE_WHITELIST => qw(
+ text/xml
+ application/xml
+);
+
sub WS_DISPATCH {
# We "require" here instead of "use" above to avoid a dependency loop.
require Bugzilla::Hook;