]> git.sur5r.net Git - openldap/commitdiff
URL with authority spec must use absolute path
authorHoward Chu <hyc@openldap.org>
Mon, 27 Nov 2006 19:03:59 +0000 (19:03 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 27 Nov 2006 19:03:59 +0000 (19:03 +0000)
libraries/liblutil/fetch.c

index 3177744097b9b479c1819309b0968d4225be7d3c..08ed885c02e315246e9ac6f2f132fd24c1f5a556 100644 (file)
@@ -52,8 +52,12 @@ ldif_open_url(
                p = urlstr + sizeof("file:")-1;
 
                /* we don't check for LDAP_DIRSEP since URLs should contain '/' */
-               if ( p[0] == '/' && p[1] == '/' )
+               if ( p[0] == '/' && p[1] == '/' ) {
                        p += 2;
+                       /* path must be absolute if authority is present */
+                       if ( p[0] != '/' )
+                               return NULL;
+               }
 
                p = ber_strdup( p );
                ldap_pvt_hex_unescape( p );