mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-22 07:39:35 -05:00
URL with authority spec must use absolute path
This commit is contained in:
parent
e7be7301c2
commit
2ccecba836
1 changed files with 5 additions and 1 deletions
|
|
@ -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 );
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue