Forbid empty session names, GitHub issue 2758.

This commit is contained in:
nicm
2021-07-06 08:18:38 +00:00
parent 1d4296f17f
commit 35c2958ae4
3 changed files with 19 additions and 1 deletions

View File

@ -237,6 +237,8 @@ session_check_name(const char *name)
{
char *copy, *cp, *new_name;
if (*name == '\0')
return (NULL);
copy = xstrdup(name);
for (cp = copy; *cp != '\0'; cp++) {
if (*cp == ':' || *cp == '.')