From: Art Cancro Date: Tue, 10 Feb 2009 19:09:17 +0000 (+0000) Subject: * Restored the url-decoding of supplied GroupDAV pathnames. This repairs access... X-Git-Tag: v7.86~1473 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=c8f0a128a10fab057136c260ef8f05cc417abde8;p=citadel.git * Restored the url-decoding of supplied GroupDAV pathnames. This repairs access to objects that have special characters in their uid's, and eliminates one more TODO in the code. --- diff --git a/webcit/groupdav_main.c b/webcit/groupdav_main.c index 6a7f8beac..1b8a099df 100644 --- a/webcit/groupdav_main.c +++ b/webcit/groupdav_main.c @@ -135,24 +135,8 @@ void groupdav_main(HashList *HTTPHeaders, return; } -// extract_token(dav_method, req->line, 0, ' ', sizeof dav_method); -// extract_token(dav_pathname, req->line, 1, ' ', sizeof dav_pathname); - //// TODO unescape_input(dav_pathname); - - /* If the request does not begin with "/groupdav", prepend it. If - * we happen to introduce a double-slash, that's ok; we'll strip it - * in the next step. - * - * (THIS IS DISABLED BECAUSE WE ARE NOW TRYING TO DO REAL DAV.) - * - if (strncasecmp(dav_pathname, "/groupdav", 9)) { - char buf[512]; - snprintf(buf, sizeof buf, "/groupdav/%s", dav_pathname); - safestrncpy(dav_pathname, buf, sizeof dav_pathname); - } - * - */ - + StrBufUnescape(DavPathname, 0); + /* Remove any stray double-slashes in pathname */ while (ds=strstr(ChrPtr(DavPathname), "//"), ds != NULL) { strcpy(ds, ds+1);