[Bug 601] New: httpd fails to interpret index.php when referred to via http://ip

bugzilla at busybox.net bugzilla at busybox.net
Mon Sep 7 15:24:04 UTC 2009


https://bugs.busybox.net/show_bug.cgi?id=601

              Host: T2 Custom Distribution
            Target: x86
             Build: 1.14.3
           Summary: httpd fails to interpret index.php when referred to via
                    http://ip
           Product: Busybox
           Version: 1.14.x
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Networking
        AssignedTo: unassigned at busybox.net
        ReportedBy: michael at askozia.com
                CC: busybox-cvs at busybox.net
   Estimated Hours: 0.5


I may have found a bug in Busybox 1.14.3 involving index.php pages. The httpd
process tries to send me an unprocessed php file when I access the server via
http://ip/ (no index.php). If, however, I access it via http://ip/index.php,
things work fine.

My httpd.conf is here:
http://pastebin.ca/1557112

Index.php is here:
https://wush.net/trac/askozia/browser/trunk/package/overlays/pbx/rootfs/usr/www/index.php

Busybox.conf is here:
http://pastebin.ca/1557217

Wireshark trace '/':
http://pastebin.ca/1557234

Wireshark trace '/index.php':
http://pastebin.ca/1557237


The index.php file is not interpreted and is simply sent as a file to the
client. The source of httpd.c seems to point to an unmatched condition near
line 2139. Currently, a cgi-bin/index.cgi file is checked for and executed if
present. However, I believe this bit should also check for an index.php and
pass it to the interpreter.

I'm not sure how I can implement this as I'm still familiarizing myself with
the use and purpose of urlp and tptr. Perhaps since this index_page string
overrites urlp on line 2123 simply executing the conditional interpreter bits
between 2104 and 2116 is enough?

Any feedback is greatly appreciated. If any additional information is needed
I'll gladly provide it. Sorry I couldn't post up a patch right away!


-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list