diff options
-rw-r--r-- | src/mod_webdav.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mod_webdav.c b/src/mod_webdav.c index b1bdab84..67153e3c 100644 --- a/src/mod_webdav.c +++ b/src/mod_webdav.c @@ -1958,12 +1958,14 @@ static handler_t mod_webdav_copymove(server *srv, connection *con, plugin_data * * */ start = destination->ptr; + sep = start + buffer_string_length(con->uri.scheme); - if (NULL == (sep = strstr(start, "://"))) { + if (0 != strncmp(start, con->uri.scheme->ptr, sep - start) + || sep[0] != ':' || sep[1] != '/' || sep[2] != '/') { con->http_status = 400; return HANDLER_FINISHED; } - buffer_copy_string_len(p->uri.scheme, start, sep - start); + buffer_copy_buffer(p->uri.scheme, con->uri.scheme); /*(unused?)*/ start = sep + 3; |