mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
disable XML params, they are just used by malicious bots to determine if we have XML vuls.
This commit is contained in:
parent
1eb1756dcf
commit
6ca6853392
|
@ -129,5 +129,11 @@ module Discourse
|
|||
config.after_initialize do
|
||||
OpenID::Util.logger = Rails.logger
|
||||
end
|
||||
|
||||
# This is not really required per-se, but we do not want to support
|
||||
# XML params, we see errors in our logs about malformed XML and there
|
||||
# absolutly no spot in our app were we use XML as opposed to JSON endpoints
|
||||
ActionDispatch::ParamsParser::DEFAULT_PARSERS.delete(Mime::XML)
|
||||
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user