From: Howard Chu Date: Mon, 27 Nov 2006 19:03:59 +0000 (+0000) Subject: URL with authority spec must use absolute path X-Git-Tag: OPENLDAP_REL_ENG_2_4_4ALPHA~8^2~435 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2ccecba836485cc55c23b51e39d3dd4f281b5347;p=openldap URL with authority spec must use absolute path --- diff --git a/libraries/liblutil/fetch.c b/libraries/liblutil/fetch.c index 3177744097..08ed885c02 100644 --- a/libraries/liblutil/fetch.c +++ b/libraries/liblutil/fetch.c @@ -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 );