Branch: Tag:

2018-04-06

2018-04-06 12:32:47 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Filesystem [WebDAV]: Forbid copy where source and dest overlap.

1715:    TRACE_LEAVE("");    return Roxen.http_status(403, "Permission denied.");    } +  if (has_prefix(source, dest)) { +  TRACE_LEAVE("Destination contains source."); +  TRACE_LEAVE(""); +  return Roxen.http_status(403, "Permission denied."); +  }    switch(overwrite) {    case NEVER_OVERWRITE:    TRACE_LEAVE("");
1799:    }       if (source_st->isdir) { +  if (has_prefix(dest, source)) { +  TRACE_LEAVE("Source contains destination."); +  return Roxen.http_status(403, "Permission denied."); +  } +     mkdirs++;    object privs;    SETUID_TRACE("Creating directory/collection", 0);