X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=psftp.h;h=2f323c7b6c88afd9c412cf83cb14783f72a33981;hb=6c81ee6706f75ccab7bc285d00139126524cce36;hp=af8917dbe0484904d308bfa5066ac0c2605348d8;hpb=5ea746b15d173ab75f10ae661432eb57a5a22c20;p=PuTTY.git diff --git a/psftp.h b/psftp.h index af8917db..2f323c7b 100644 --- a/psftp.h +++ b/psftp.h @@ -149,6 +149,16 @@ WildcardMatcher *begin_wildcard_matching(char *name); 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. */