From 2ccecba836485cc55c23b51e39d3dd4f281b5347 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 27 Nov 2006 19:03:59 +0000 Subject: [PATCH] URL with authority spec must use absolute path --- libraries/liblutil/fetch.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 ); -- 2.47.2