Created
January 9, 2013 01:12
-
-
Save johnl/4489723 to your computer and use it in GitHub Desktop.
Apache rewrite config to block xml request bodies. Simple way to block attacks targetting the recent Rails XML/yaml security bug (CVE-2013-0156). Updating or patching your rails app is preferred though: https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/t1WFuuQyavI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteCond %{REQUEST_METHOD} !GET|HEAD | |
RewriteCond %{SCRIPT_FILENAME} \.xml$ [OR] | |
RewriteCond %{HTTP:Content-Type} xml | |
RewriteRule . - [forbidden,last] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment