File: libhttpd.c.rej

package info (click to toggle)
thttpd 2.23beta1-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 684 kB
  • ctags: 679
  • sloc: ansic: 7,908; sh: 1,871; makefile: 310
file content (21 lines) | stat: -rw-r--r-- 820 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
***************
*** 2012,2017 ****
                 cp = strchr( hc->hdrhost, ':' );
                 if ( cp != (char*) 0 )
                     *cp = '\0';
                 }
             else if ( strncasecmp( buf, "Accept:", 7 ) == 0 )
                 {
--- 2012,2023 ----
                 cp = strchr( hc->hdrhost, ':' );
                 if ( cp != (char*) 0 )
                     *cp = '\0';
+                if ( ( hc->hdrhost[0] == '.' ) || 
+                        ( strchr( hc->hdrhost, '/' ) != (char*) 0 )) {
+                        httpd_send_err( hc, 400, httpd_err400title, 
+                                "", httpd_err400form, "" );
+                        return -1;
+                        }
                 }
             else if ( strncasecmp( buf, "Accept:", 7 ) == 0 )
                 {