projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement anti-replay protection for XDM-AUTHORIZATION-1, as required by
[u/mdw/putty]
/
windows
/
winsftp.c
diff --git
a/windows/winsftp.c
b/windows/winsftp.c
index
c071257
..
82bea80
100644
(file)
--- a/
windows/winsftp.c
+++ b/
windows/winsftp.c
@@
-445,6
+445,17
@@
void finish_wildcard_matching(WildcardMatcher *dir)
sfree(dir);
}
sfree(dir);
}
+int vet_filename(char *name)
+{
+ if (strchr(name, '/') || strchr(name, '\\') || strchr(name, ':'))
+ return FALSE;
+
+ if (!name[strspn(name, ".")]) /* entirely composed of dots */
+ return FALSE;
+
+ return TRUE;
+}
+
int create_directory(char *name)
{
return CreateDirectory(name, NULL) != 0;
int create_directory(char *name)
{
return CreateDirectory(name, NULL) != 0;