URL with authority spec must use absolute path

This commit is contained in:
Howard Chu 2006-11-27 19:03:59 +00:00
parent e7be7301c2
commit 2ccecba836

View file

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