Ticket #1653 (new defect)

Opened 3 weeks ago

Last modified 3 weeks ago

mod_alias silently drops aliases containing a ~

Reported by: dave@natulte.net Assigned to: jan
Priority: normal Milestone: 1.5.0
Component: mod_alias Version: 1.4.18
Severity: normal Keywords:
Cc: Blocking:
Need Feedback: 1

Description

In my configuration, I want to map a location to a script. The following would accomplish this:

alias.url = ("/~dave/logs/search" => "/home/dave/bot/logs/logsearch.py")

However, this does not work: A request for /~dave/logs/search 404s. Changing the above to:

alias.url = ("/dave/logs/search" => "/home/dave/bot/logs/logsearch.py")

results in the alias working perfectly.

For the purposes of this little exercise, mod_userdir was disabled. My original plan was of course to have this override one path within a userdir-enabled path, but this bug is present even without mod_userdir.

Attachments

Change History

04/27/2008 03:34:49 AM changed by dave@natulte.net

The following workaround is usable:

url.rewrite = ("/~dave/logs/search" => "/random_gibberish_url") alias.url = ("/random_gibberish_url" => "/home/dave/bot/logs/logsearch.py")

Apparently mod_rewrite does not suffer from the same issues, and can rewrite the tilded URL to some internal identifier (I used pwgen -s 42 to generate one). Then, mod_alias successfully maps that internal identifier to a script, and with further configuration mod_cgi can execute it.

04/28/2008 09:51:36 AM changed by stbuehler

  • pending set to 1.

I couldn't reproduce your problem, perhaps you should post a minimal config which reproduces your problem.

I even created a extra testcase to test this, see http://repo.or.cz/w/lighttpd.git?a=shortlog;h=refs/heads/lighttpd-1.4.x-stbuehler


Add/Change #1653 (mod_alias silently drops aliases containing a ~)




Change Properties