Branch: Tag:

2018-04-17

2018-04-17 14:19:24 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Filesystem [WebDAV] [NT]: Improved filename validation.

NTFS apparently prohibits '*', '?' and '|' in filenames.

Fixes some of [WS-262].

462:   {    f = normalized_path + encode_path(f);    if (FILTER_INTERNAL_FILE(f, id)) return 0; + #ifdef __NT__ +  // These characters are apparently invalid in NTFS filenames. +  if (f != replace(f, "*?|"/"", ({ "", "", "" }))) { +  return 0; +  } + #endif    catch {    f = NORMALIZE_PATH(f);    if (has_prefix(f, normalized_path) ||