X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/65857773290a7bacd6f5d84ab51a9c1228e61e99..7ecefce876e59128bd21eb9b3d3c9568968282e5:/psftp.h diff --git a/psftp.h b/psftp.h index af8917db..2f323c7b 100644 --- a/psftp.h +++ b/psftp.h @@ -150,6 +150,16 @@ char *wildcard_get_filename(WildcardMatcher *dir); void finish_wildcard_matching(WildcardMatcher *dir); /* + * Vet a filename returned from the remote host, to ensure it isn't + * in some way malicious. The idea is that this function is applied + * to filenames returned from FXP_READDIR, which means we can panic + * if we see _anything_ resembling a directory separator. + * + * Returns TRUE if the filename is kosher, FALSE if dangerous. + */ +int vet_filename(char *name); + +/* * Create a directory. Returns 0 on error, !=0 on success. */ int create_directory(char *name);