You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by Dean Gaudet <dg...@hyperreal.com> on 1997/06/28 23:58:44 UTC

cvs commit: apache/src CHANGES mod_include.c

dgaudet     97/06/28 14:58:44

  Modified:    src       CHANGES mod_include.c
  Log:
  PR#644: mod_include trampled on r->args when it shouldn't
  
  Reviewed by:	Brian
  
  Revision  Changes    Path
  1.304     +3 -0      apache/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache/src/CHANGES,v
  retrieving revision 1.303
  retrieving revision 1.304
  diff -C3 -r1.303 -r1.304
  *** CHANGES	1997/06/28 21:46:56	1.303
  --- CHANGES	1997/06/28 21:58:42	1.304
  ***************
  *** 42,47 ****
  --- 42,50 ----
         for the net if we require people that actually need this data to
         enable it.  [Linus Torvalds]
    
  +   *) QUERY_STRING was unescaped in mod_include, it shouldn't be.
  +      [Dean Gaudet] PR#644
  + 
      *) mod_include was not properly changing the current directory.
         [Marc Slemko] PR#742
    
  
  
  
  1.37      +12 -6     apache/src/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/mod_include.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -C3 -r1.36 -r1.37
  *** mod_include.c	1997/06/28 19:49:38	1.36
  --- mod_include.c	1997/06/28 21:58:42	1.37
  ***************
  *** 132,140 ****
        else
            table_set (e, "DOCUMENT_NAME", r->uri);
        if (r->args) {
  !         unescape_url (r->args);
    	  table_set (e, "QUERY_STRING_UNESCAPED",
  ! 		   escape_shell_cmd (r->pool, r->args));
        }
    }
    
  --- 132,142 ----
        else
            table_set (e, "DOCUMENT_NAME", r->uri);
        if (r->args) {
  ! 	char *arg_copy = pstrdup (r->pool, r->args);
  ! 
  !         unescape_url (arg_copy);
    	  table_set (e, "QUERY_STRING_UNESCAPED",
  ! 		   escape_shell_cmd (r->pool, arg_copy));
        }
    }
    
  ***************
  *** 630,639 ****
        }
    
        if (r->args) {
            table_set (env, "QUERY_STRING", r->args);
  ! 	unescape_url (r->args);
    	table_set (env, "QUERY_STRING_UNESCAPED",
  ! 		   escape_shell_cmd (r->pool, r->args));
        }
        
        error_log2stderr (r->server);
  --- 632,643 ----
        }
    
        if (r->args) {
  + 	char *arg_copy = pstrdup (r->pool, r->args);
  + 
            table_set (env, "QUERY_STRING", r->args);
  ! 	unescape_url (arg_copy);
    	table_set (env, "QUERY_STRING_UNESCAPED",
  ! 		   escape_shell_cmd (r->pool, arg_copy));
        }
        
        error_log2stderr (r->server);
  ***************
  *** 1676,1685 ****
    
        chdir_file (r->filename);
        if (r->args) { /* add QUERY stuff to env cause it ain't yet */
            table_set (r->subprocess_env, "QUERY_STRING", r->args);
  !         unescape_url (r->args);
            table_set (r->subprocess_env, "QUERY_STRING_UNESCAPED",
  !                 escape_shell_cmd (r->pool, r->args));
        }
    
        while(1) {
  --- 1680,1691 ----
    
        chdir_file (r->filename);
        if (r->args) { /* add QUERY stuff to env cause it ain't yet */
  + 	char *arg_copy = pstrdup (r->pool, r->args);
  + 
            table_set (r->subprocess_env, "QUERY_STRING", r->args);
  !         unescape_url (arg_copy);
            table_set (r->subprocess_env, "QUERY_STRING_UNESCAPED",
  !                 escape_shell_cmd (r->pool, arg_copy));
        }
    
        while(1) {