https://redmine.lighttpd.net/https://redmine.lighttpd.net/favicon.ico?13667327412008-04-27T03:34:49Zlighty labsLighttpd - Bug #1653: mod_alias silently drops aliases containing a ~https://redmine.lighttpd.net/issues/1653?journal_id=40682008-04-27T03:34:49ZAnonymous
<ul></ul><p>The following workaround is usable:</p>
<p>url.rewrite = ("^/~dave/logs/search" => "/random_gibberish_url")<br />alias.url = ("/random_gibberish_url" => "/home/dave/bot/logs/logsearch.py")</p>
<p>Apparently mod_rewrite does not suffer from the same issues, and can rewrite the tilded URL to some internal identifier (I used <code>pwgen -s 42</code> to generate one). Then, mod_alias successfully maps that internal identifier to a script, and with further configuration mod_cgi can execute it.</p>
<p>-- dave</p> Lighttpd - Bug #1653: mod_alias silently drops aliases containing a ~https://redmine.lighttpd.net/issues/1653?journal_id=40692008-04-28T09:51:36Zstbuehler
<ul></ul><p>I couldn't reproduce your problem, perhaps you should post a minimal config which reproduces your problem.</p>
<p>I even created a extra testcase to test this, see <a class="external" href="http://repo.or.cz/w/lighttpd.git?a=shortlog;h=refs/heads/lighttpd-1.4.x-stbuehler">http://repo.or.cz/w/lighttpd.git?a=shortlog;h=refs/heads/lighttpd-1.4.x-stbuehler</a></p> Lighttpd - Bug #1653: mod_alias silently drops aliases containing a ~https://redmine.lighttpd.net/issues/1653?journal_id=40702008-08-27T21:22:43Zstbuehler
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Fixed</i></li><li><strong>Resolution</strong> set to <i>worksforme</i></li></ul><p>Missing feedback.</p> Lighttpd - Bug #1653: mod_alias silently drops aliases containing a ~https://redmine.lighttpd.net/issues/1653?journal_id=40712008-08-28T14:15:26Zmoo
<ul><li><strong>Status</strong> changed from <i>Fixed</i> to <i>Need Feedback</i></li><li><strong>Resolution</strong> deleted (<del><i>worksforme</i></del>)</li></ul><p>i can reproduce this bug when pressing "enter" in firefox address bar, request is sent as "%7e" or "%7E". This issue affects mod_alias/redirect/rewrite as they match on raw url instead of clean url (lighttpd 1.5)</p> Lighttpd - Bug #1653: mod_alias silently drops aliases containing a ~https://redmine.lighttpd.net/issues/1653?journal_id=40722008-09-22T10:28:30Zstbuehler
<ul><li><strong>Status</strong> changed from <i>Need Feedback</i> to <i>Fixed</i></li><li><strong>Resolution</strong> set to <i>worksforme</i></li></ul><p>And i checked it again...:</p>
<pre>
server.modules = (
"mod_alias",
)
server.document-root = var.cwd + "/default/htdocs"
server.port = 8081
alias.url = ( "/~user1/test.txt" => var.cwd + "/default/htdocs/test.txt" )
</pre>
<p>There is of course a test.txt in ./default/htdocs/</p>
<p>Now, i can get other files in that directory with <a class="external" href="http://localhost:8081/otherfile">http://localhost:8081/otherfile</a> but not with <a class="external" href="http://localhost:8081/~user1/otherfile">http://localhost:8081/~user1/otherfile</a> (as expected), but <a class="external" href="http://localhost:8081/~user1/test.txt">http://localhost:8081/~user1/test.txt</a> works, with and without %7e encoding:</p>
<pre>
$ curl -v http://localhost:8081/%7euser1/test.txt
* About to connect() to localhost port 8081 (#0)
* Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8081 (#0)
> GET /%7euser1/test.txt HTTP/1.1
> User-Agent: curl/7.18.2 (i486-pc-linux-gnu) libcurl/7.18.2 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.8 libssh2/0.18
> Host: localhost:8081
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/octet-stream
< Accept-Ranges: bytes
< Content-Length: 328
< Date: Mon, 22 Sep 2008 09:48:45 GMT
< Server: lighttpd/1.4.19
<
Hi!
0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
* Connection #0 to host localhost left intact
* Closing connection #0
</pre>
<p>For rewrite/redirect see <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Bug: Rewrite/redirect rules and URL encoding (Fixed)" href="https://redmine.lighttpd.net/issues/1720">#1720</a></p> Lighttpd - Bug #1653: mod_alias silently drops aliases containing a ~https://redmine.lighttpd.net/issues/1653?journal_id=49652008-10-10T19:10:31Zstbuehler
<ul><li><strong>Status</strong> changed from <i>Fixed</i> to <i>Missing Feedback</i></li></ul>