Commit fc051725 authored by Ralf S. Engelschall's avatar Ralf S. Engelschall
Browse files

Fixed an infinite loop for references above the server root.

PR:	748
Submitted by:	Dean Gaudet
Reviewed by:	Brian Behlendorf


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3@78847 13f79535-47bb-0310-9956-ffa450edef68
parent 712804bc
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
Changes with Apache 1.2.2

  *) Fixed an infinite loop in mod_imap for references above the server root
     [Dean Gaudet] PR#748

  *) mod_include cleanup showed that handle_else was being used to handle
     endif.  It didn't cause problems, but it was cleaned up too.
     [Howard Fear]
+4 −0
Original line number Diff line number Diff line
@@ -475,6 +475,10 @@ void imap_url(request_rec *r, char *base, char *value, char *url)
	  }

	  value += 2;      /* jump over the '..' that we found in the value */
      } else if (directory) {
	url[0] = '\0';
	log_reason("invalid directory name in map file", r->uri, r);
	return;
      }
      
      if (! strncmp(value, "/../", 4) || ! strcmp(value, "/..") )