Allow :. in names again, forbidding them is overly pernickety. Only

forbid invalid UTF-8 and #(.
This commit is contained in:
nicm
2026-06-29 18:17:28 +00:00
parent bcd54d12d8
commit 65a032b205
12 changed files with 35 additions and 63 deletions

View File

@@ -52,12 +52,12 @@ cmd_rename_session_exec(struct cmd *self, struct cmdq_item *item)
char *newname, *tmp;
tmp = format_single_from_target(item, args_string(args, 0));
if (!check_name(tmp, SESSION_NAME_FORBID)) {
if (!check_name(tmp)) {
cmdq_error(item, "invalid session name: %s", tmp);
free(tmp);
return (CMD_RETURN_ERROR);
}
newname = clean_name(tmp, SESSION_NAME_FORBID);
newname = clean_name(tmp, 0);
free(tmp);
if (strcmp(newname, s->name) == 0) {
free(newname);