mirror of
https://github.com/tmate-io/tmate.git
synced 2026-08-03 16:12:08 +00:00
Do not permit periods in session names (colons are already banned). From
J Raynor.
This commit is contained in:
parent
df680d7257
commit
9ee93b3ea3
1 changed files with 2 additions and 2 deletions
|
|
@ -175,11 +175,11 @@ session_destroy(struct session *s)
|
|||
RB_INSERT(sessions, &dead_sessions, s);
|
||||
}
|
||||
|
||||
/* Check a session name is valid: not empty and no colons. */
|
||||
/* Check a session name is valid: not empty and no colons or periods. */
|
||||
int
|
||||
session_check_name(const char *name)
|
||||
{
|
||||
return (*name != '\0' && strchr(name, ':') == NULL);
|
||||
return (*name != '\0' && name[strcspn(name, ":.")] == '\0');
|
||||
}
|
||||
|
||||
/* Update session active time. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue