[Bug 6686] New: httpd processing not correct for cross domain post

bugzilla at busybox.net bugzilla at busybox.net
Tue Nov 12 21:25:34 UTC 2013


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

            Target: ARM
             Build: rootfs build with buildroot
           Summary: httpd processing not correct for cross domain post
           Product: Busybox
           Version: 1.21.x
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: blocker
          Priority: P5
         Component: Networking
        AssignedTo: unassigned at busybox.net
        ReportedBy: sagaert.johan at skynet.be
                CC: busybox-cvs at busybox.net
   Estimated Hours: 0.0


context: a webpage running on server http:192.168.1.102:7020 is doing a http
post to 192.168.1.61

The env variable PATH_INFO does not seem to be correct when doing a cross
domain POST : as seen from the REQUEST_URI='/cgi-bin/busctl.cgi/relay/14'
the correct PATH_INFO should be /relay/14.

The problem does not happen if i host all pages on the same device
(192.168.1.61) 

I am not sure if the port specifier could cause this.

I saved the environment vars into a file (using a cgi-script): see below

CONTENT_LENGTH='7'
CONTENT_TYPE='application/x-www-form-urlencoded; charset=UTF-8'
GATEWAY_INTERFACE='CGI/1.1'
HOME='/'
HTTP_ACCEPT='application/json, text/javascript, */*; q=0.01'
HTTP_ACCEPT_LANGUAGE='nl,en-us;q=0.7,en;q=0.3'
HTTP_HOST='192.168.1.61'
HTTP_REFERER='http://192.168.1.102:7020/testemd/index.html'
HTTP_USER_AGENT='Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101
Firefox/25.0'
IFS='     
'
OPTIND='1'
PATH='/sbin:/usr/sbin:/bin:/usr/bin'
PATH_INFO='/relay'                         <<<<<<- WRONG
PPID='4987'
PS1='\w \$ '
PS2='> '
PS4='+ '
PWD='/opt/www/cgi-bin'
QUERY_STRING=''
REMOTE_ADDR='192.168.1.102'
REMOTE_PORT='5413'
REQUEST_METHOD='POST'
REQUEST_URI='/cgi-bin/busctl.cgi/relay/14'
SCRIPT_FILENAME='/opt/www/cgi-bin/busctl.cgi'
SCRIPT_NAME='/cgi-bin/busctl.cgi'
SERVER_PROTOCOL='HTTP/1.0'
SERVER_SOFTWARE='busybox httpd/1.21.1'
SHELL='/bin/sh'
TERM='vt102'
USER='root'

-- 
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