Project

General

Profile

Actions

Bug #3077

closed

physical path resolving seems broken

Added by nanont about 3 years ago. Updated about 3 years ago.

Status:
Invalid
Priority:
Low
Category:
-
Target version:
-
ASK QUESTIONS IN Forums:
No

Description

I have stumbled upon some behaviour present in at least v1.4.58 and v.1.4.55 that looks like a bug, and I couldn't find any issue that seems to deal with this.

Consider an URL like example.com served by a minimal config file (server.document-root and not much else). Files present in the document-root are served as expected (e.g. "test.jpg" is reachable as "example.com/test.jpg").

However, that same file is also reachable as "example.com/test.jpg/test.jpg" or even "example.com/test.jpg/foo/bar". It looks like the last parts of the request URL do not matter at all. I do not use mod_rewrite.

Here's an excerpt of the log:

2021-04-11 18:00:28: response.c.519) -- before doc_root
2021-04-11 18:00:28: response.c.521) Doc-Root     : /usr/local/www/lighttpd/vhosts/[redacted].com/htdocs
2021-04-11 18:00:28: response.c.523) Rel-Path     : /test.jpg/foo/bar
2021-04-11 18:00:28: response.c.525) Path         : /usr/local/www/lighttpd/vhosts/[redacted].com/htdocs/test.jpg
2021-04-11 18:00:28: response.c.558) -- after doc_root
2021-04-11 18:00:28: response.c.560) Doc-Root     : /usr/local/www/lighttpd/vhosts/[redacted].com/htdocs
2021-04-11 18:00:28: response.c.562) Rel-Path     : /test.jpg/foo/bar
2021-04-11 18:00:28: response.c.564) Path         : /usr/local/www/lighttpd/vhosts/[redacted].com/htdocs/test.jpg/foo/bar
2021-04-11 18:00:28: response.c.579) -- logical -> physical
2021-04-11 18:00:28: response.c.581) Doc-Root     : /usr/local/www/lighttpd/vhosts/[redacted].com/htdocs
2021-04-11 18:00:28: response.c.583) Basedir      : /usr/local/www/lighttpd/vhosts/[redacted].com/htdocs
2021-04-11 18:00:28: response.c.585) Rel-Path     : /test.jpg/foo/bar
2021-04-11 18:00:28: response.c.587) Path         : /usr/local/www/lighttpd/vhosts/[redacted].com/htdocs/test.jpg/foo/bar
2021-04-11 18:00:28: response.c.602) -- handling physical path
2021-04-11 18:00:28: response.c.604) Path         : /usr/local/www/lighttpd/vhosts/[redacted].com/htdocs/test.jpg/foo/bar
2021-04-11 18:00:28: response.c.612) -- handling subrequest
2021-04-11 18:00:28: response.c.614) Path         : /usr/local/www/lighttpd/vhosts/[redacted].com/htdocs/test.jpg
2021-04-11 18:00:28: response.c.616) URI          : /test.jpg
2021-04-11 18:00:28: response.c.618) Pathinfo     : /foo/bar
Actions #1

Updated by gstrauss about 3 years ago

  • Category deleted (core)
  • Status changed from New to Invalid
  • Priority changed from Normal to Low
  • Target version deleted (1.4.x)

Please read the documentation for mod_staticfile, specifically static-file.disable-pathinfo

Actions #2

Updated by nanont about 3 years ago

gstrauss wrote in #note-1:

Please read the documentation for mod_staticfile, specifically static-file.disable-pathinfo

Thanks a lot, that helped.

Actions

Also available in: Atom