<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ConvolutedTheory &#187; drupal</title>
	<atom:link href="http://www.convolutedtheory.com/tag/drupal/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.convolutedtheory.com</link>
	<description>Nerdy. Deal with it. Or go away.</description>
	<lastBuildDate>Sun, 28 Mar 2010 19:14:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Drupal and mod_security : Part 2</title>
		<link>http://www.convolutedtheory.com/tech/linux/drupal-modsecurity-part-2/</link>
		<comments>http://www.convolutedtheory.com/tech/linux/drupal-modsecurity-part-2/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 23:29:06 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[mod_security]]></category>

		<guid isPermaLink="false">http://www.convolutedtheory.com/?p=126</guid>
		<description><![CDATA[Hi all,
I've gotten quite a few emails regarding my last post about Drupal and mod_security, and what those rules I'm removing actually do. Well, I'll explain.
First Rule: 960010
SecRule REQUEST_METHOD "!^(?:get&#124;head&#124;propfind&#124;options)$" \
    "chain, t:lowercase, deny,log,auditlog,status:401,msg:'Request content type
is not allowed by policy',,id:'960010',severity:'4'"
SecRule REQUEST_HEADERS:Content-Type "!(?:^(?:application\/x-www-form-urlencoded
(?:;(?:\s?charset\s?=\s?[\w\d\-]{1,18})?)??$&#124;multipart/form-data;)&#124;text/xml)"
This rule basically only allows certain content-type headers to be passed [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>Hi all,</p>
<p>I've gotten quite a few emails regarding my last post about <a href="http://www.convolutedtheory.com/tech/mod_security-and-drupal-62-issues/">Drupal and mod_security</a>, and what those rules I'm removing actually do. Well, I'll explain.</p>
<p>First Rule: 960010<br />
SecRule REQUEST_METHOD "!^(?:get|head|propfind|options)$" \<br />
    "chain, t:lowercase, deny,log,auditlog,status:401,msg:'Request content type<br />
is not allowed by policy',,id:'960010',severity:'4'"<br />
SecRule REQUEST_HEADERS:Content-Type "!(?:^(?:application\/x-www-form-urlencoded<br />
(?:;(?:\s?charset\s?=\s?[\w\d\-]{1,18})?)??$|multipart/form-data;)|text/xml)"</p>
<p>This rule basically only allows certain content-type headers to be passed with the request methods listed in REQUEST_METHOD. Apparently, Drupal doesn't respect this rule in posts. </p>
<p>Next, 960015<br />
SecRule &#038;REQUEST_HEADERS:Accept "@eq 0" \<br />
    "chain,skip:1,log,auditlog,msg:'Request Missing an Accept Header', severity:'2',,id:'960015',"<br />
SecRule REQUEST_METHOD "!^OPTIONS$" "t:none"<br />
SecRule REQUEST_HEADERS:Accept "^$" \<br />
    "chain,log,auditlog,msg:'Request Missing an Accept Header', severity:'2',,id:'960015',"<br />
SecRule REQUEST_METHOD "!^OPTIONS$" "t:none"</p>
<p>This basically says, any request other than an OPTIONS request, *must* have an Accept header sent with it. </p>
<p>Next, 960032:<br />
SecRule REQUEST_METHOD "!^((?:(?:POS|GE)T|OPTIONS|HEAD))$" \<br />
    "phase:2,log,auditlog,status:401,msg:'Method is not allowed by policy', severity:'2',,id:'960032',"</p>
<p>This says any methods other than POST, GET, OPTIONS or HEAD aren't allowed. While generally this is true, and I don't know why Drupal will occasionally hit this rule, I just remove it out of completeness.</p>
<p>And Lastly,</p>
<p>Rule 950107:<br />
SecRule REQUEST_FILENAME|ARGS|ARGS_NAMES|REQUEST_HEADERS|XML:/*|!REQUEST_HEADERS:Referer "@validateUrlEncoding" \<br />
        "chain, deny,log,auditlog,status:400,msg:'URL Encoding Abuse Attack Attempt',,id:'950107',severity:'4'"<br />
SecRule REQUEST_FILENAME|ARGS|ARGS_NAMES|REQUEST_HEADERS|XML:/*|!REQUEST_HEADERS:Referer "\%(?!$|\W|[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})"</p>
<p>This rule merely checks the URL encoding on a URL. I say merely, but this rule is also matched almost _all of the time_.</p>
<p>I haven't actually run through the Drupal code and figured out why these are completely necessary, however I do know that they've fixed quite a few peoples problems.</p>
<p>Anyway, hope that clarifies some things for people.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.convolutedtheory.com/tech/linux/drupal-modsecurity-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mod_security and Drupal 6.2 issues.</title>
		<link>http://www.convolutedtheory.com/tech/mod_security-and-drupal-62-issues/</link>
		<comments>http://www.convolutedtheory.com/tech/mod_security-and-drupal-62-issues/#comments</comments>
		<pubDate>Thu, 02 Oct 2008 11:25:27 +0000</pubDate>
		<dc:creator>Derek</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[mod_security]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.convolutedtheory.com/?p=15</guid>
		<description><![CDATA[If you're going to be using Drupal with mod_security, making the following changes will probably save you some frustration later  .
&#60;LocationMatch "/"&#62;
SecRuleRemoveById 960010
SecRuleRemoveById 960015
SecRuleRemoveById 960032
SecRuleRemoveById 950107
&#60;/LocationMatch&#62;
Also, set SecResponseBodyLimit and SecRequestBodyInMemoryLimit to something like 51200000 and 12288000 respectively. They may seem a bit high, but if you're managing a lot of Drupal users and permissions [...]


No related posts.

Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.]]></description>
			<content:encoded><![CDATA[<p>If you're going to be using Drupal with mod_security, making the following changes will probably save you some frustration later <img src='http://www.convolutedtheory.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>&lt;LocationMatch "/"&gt;<br />
SecRuleRemoveById 960010<br />
SecRuleRemoveById 960015<br />
SecRuleRemoveById 960032<br />
SecRuleRemoveById 950107<br />
&lt;/LocationMatch&gt;</p>
<p>Also, set SecResponseBodyLimit and SecRequestBodyInMemoryLimit to something like 51200000 and 12288000 respectively. They may seem a bit high, but if you're managing a lot of Drupal users and permissions I've run into problems with them.</p>
<p>Happy Drupal-ing.</p>


<p>No related posts.</p>
<p>Related posts brought to you by <a href='http://mitcho.com/code/yarpp/'>Yet Another Related Posts Plugin</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://www.convolutedtheory.com/tech/mod_security-and-drupal-62-issues/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
