<?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>Fri, 30 Dec 2011 15:39:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<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&#8217;ve gotten quite a few emails regarding my last post about Drupal and mod_security, and what those rules I&#8217;m removing actually do. Well, I&#8217;ll explain.
First Rule: 960010
SecRule REQUEST_METHOD &#8220;!^(?:get&#124;head&#124;propfind&#124;options)$&#8221; \
    &#8220;chain, t:lowercase, deny,log,auditlog,status:401,msg:&#8217;Request content type
is not allowed by policy&#8217;,,id:&#8217;960010&#8242;,severity:&#8217;4&#8242;&#8221;
SecRule REQUEST_HEADERS:Content-Type &#8220;!(?:^(?:application\/x-www-form-urlencoded
(?:;(?:\s?charset\s?=\s?[\w\d\-]{1,18})?)??$&#124;multipart/form-data;)&#124;text/xml)&#8221;
This rule basically only allows certain content-type headers to be passed [...]]]></description>
			<content:encoded><![CDATA[<p>Hi all,</p>
<p>I&#8217;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&#8217;m removing actually do. Well, I&#8217;ll explain.</p>
<p>First Rule: 960010<br />
SecRule REQUEST_METHOD &#8220;!^(?:get|head|propfind|options)$&#8221; \<br />
    &#8220;chain, t:lowercase, deny,log,auditlog,status:401,msg:&#8217;Request content type<br />
is not allowed by policy&#8217;,,id:&#8217;960010&#8242;,severity:&#8217;4&#8242;&#8221;<br />
SecRule REQUEST_HEADERS:Content-Type &#8220;!(?:^(?:application\/x-www-form-urlencoded<br />
(?:;(?:\s?charset\s?=\s?[\w\d\-]{1,18})?)??$|multipart/form-data;)|text/xml)&#8221;</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&#8217;t respect this rule in posts. </p>
<p>Next, 960015<br />
SecRule &#038;REQUEST_HEADERS:Accept &#8220;@eq 0&#8243; \<br />
    &#8220;chain,skip:1,log,auditlog,msg:&#8217;Request Missing an Accept Header&#8217;, severity:&#8217;2&#8242;,,id:&#8217;960015&#8242;,&#8221;<br />
SecRule REQUEST_METHOD &#8220;!^OPTIONS$&#8221; &#8220;t:none&#8221;<br />
SecRule REQUEST_HEADERS:Accept &#8220;^$&#8221; \<br />
    &#8220;chain,log,auditlog,msg:&#8217;Request Missing an Accept Header&#8217;, severity:&#8217;2&#8242;,,id:&#8217;960015&#8242;,&#8221;<br />
SecRule REQUEST_METHOD &#8220;!^OPTIONS$&#8221; &#8220;t:none&#8221;</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 &#8220;!^((?:(?:POS|GE)T|OPTIONS|HEAD))$&#8221; \<br />
    &#8220;phase:2,log,auditlog,status:401,msg:&#8217;Method is not allowed by policy&#8217;, severity:&#8217;2&#8242;,,id:&#8217;960032&#8242;,&#8221;</p>
<p>This says any methods other than POST, GET, OPTIONS or HEAD aren&#8217;t allowed. While generally this is true, and I don&#8217;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 &#8220;@validateUrlEncoding&#8221; \<br />
        &#8220;chain, deny,log,auditlog,status:400,msg:&#8217;URL Encoding Abuse Attack Attempt&#8217;,,id:&#8217;950107&#8242;,severity:&#8217;4&#8242;&#8221;<br />
SecRule REQUEST_FILENAME|ARGS|ARGS_NAMES|REQUEST_HEADERS|XML:/*|!REQUEST_HEADERS:Referer &#8220;\%(?!$|\W|[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})&#8221;</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&#8217;t actually run through the Drupal code and figured out why these are completely necessary, however I do know that they&#8217;ve fixed quite a few peoples problems.</p>
<p>Anyway, hope that clarifies some things for people.</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&#8217;re going to be using Drupal with mod_security, making the following changes will probably save you some frustration later  .
&#60;LocationMatch &#8220;/&#8221;&#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&#8217;re managing a lot of Drupal users and permissions [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;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 &#8220;/&#8221;&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&#8217;re managing a lot of Drupal users and permissions I&#8217;ve run into problems with them.</p>
<p>Happy Drupal-ing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.convolutedtheory.com/tech/mod_security-and-drupal-62-issues/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

