diff options
author | default <nobody@localhost> | 2023-10-13 06:33:12 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2023-10-13 06:33:12 +0200 |
commit | 253e7f9eaa3f3279f2a8639949f74acf0797de33 (patch) | |
tree | bb7ff4868154bdad2325c27fdd0b4c55083dd5f4 /snac.c | |
parent | e127269a4a095c8628cef8e83c10588fd91666da (diff) |
Don't allow creating users which user name strings only differ in case.
Diffstat (limited to 'snac.c')
-rw-r--r-- | snac.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -79,6 +79,9 @@ double ftime(void) int validate_uid(const char *uid) /* returns if uid is a valid identifier */ { + if (!uid || *uid == '\0') + return 0; + while (*uid) { if (!(isalnum(*uid) || *uid == '_')) return 0; |