<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Rant on Andrew's Memory Blog</title><link>https://andrewmemory.acornwall.net/tags/rant/</link><description>Recent content in Rant on Andrew's Memory Blog</description><generator>Hugo -- gohugo.io</generator><image><url>https://andrewmemory.acornwall.net/img/rss_image.png</url><title>Rant on Andrew's Memory Blog</title><link>https://andrewmemory.acornwall.net/</link></image><language>en</language><managingEditor>andrewmemoryblog@gmail.com (Andrew's Memory Blog)</managingEditor><webMaster>andrewmemoryblog@gmail.com (Andrew's Memory Blog)</webMaster><copyright>Copyright 2009--2025</copyright><lastBuildDate>Tue, 01 May 2018 21:25:32 -0700</lastBuildDate><atom:link href="https://andrewmemory.acornwall.net/tags/rant/index.xml" rel="self" type="application/rss+xml"/><item><title>What's up with mod_security and User-Agent? (406 Not Acceptable)</title><link>https://andrewmemory.acornwall.net/blog/2018-05-01-whats-up-with-mod_security-and-user-agent-406-not-acceptable/</link><pubDate>Tue, 01 May 2018 21:25:32 -0700</pubDate><author>andrewmemoryblog@gmail.com (Andrew's Memory Blog)</author><guid>https://andrewmemory.acornwall.net/blog/2018-05-01-whats-up-with-mod_security-and-user-agent-406-not-acceptable/</guid><description>&lt;p&gt;So&amp;hellip; what&amp;rsquo;s the deal with mod_security and User-Agent? I tried to browse to &lt;a href="http://handheldradio.net" target="_blank" rel="noreferrer"&gt;HandheldRadio.net&lt;/a&gt; using Lynx, and was greeted with this 406 error:&lt;/p&gt;
&lt;figure class="highlight"&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-" data-lang=""&gt; Not Acceptable
An appropriate representation of the requested resource / could not be
found on this server.
Additionally, a 406 Not Acceptable error was encountered while trying
to use an ErrorDocument to handle the request.&lt;/code&gt;&lt;/pre&gt;
&lt;/figure&gt;
&lt;p&gt;A few searches and I discovered this was due to Apache mod_security.&lt;/p&gt;
&lt;p&gt;I don&amp;rsquo;t get it. Why would you exclude based on User-Agent? That&amp;rsquo;s something that can be changed at will by any program that decides to be nefarious. This seems like security theatre rather than real security.&lt;/p&gt;
&lt;p&gt;Even in the &lt;a href="https://flameeyes.posts/2009/02/16/my-idea-works-filtering-by-user-agent-that-is/" target="_blank" rel="noreferrer"&gt;best case&lt;/a&gt;, this kind of &amp;ldquo;security&amp;rdquo; just turns into a red queen&amp;rsquo;s race to the bottom where everything will now lie about what it is because someone screwed up a config file somewhere.&lt;/p&gt;
&lt;p&gt;And so I&amp;rsquo;ve started lying (in my .bashrc):&lt;/p&gt;
&lt;figure class="highlight"&gt;
&lt;pre tabindex="0"&gt;&lt;code class="language-" data-lang=""&gt;alias lynx=&amp;#39;lynx -useragent=&amp;#34;Mozilla/5.0 (X11; Ubuntu Lynx; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0&amp;#34;&amp;#39;&lt;/code&gt;&lt;/pre&gt;
&lt;/figure&gt;
&lt;p&gt;Damn, that&amp;rsquo;s stupid.&lt;/p&gt;</description></item></channel></rss>