From ec89eb955236f91e63febe1764123e605641fc52 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 6 Apr 2011 21:51:31 +0000 Subject: Change so that an empty session name always means the current sessions even if given with, for example, -t '', and explicitly forbid empty session names and those containing a : when they are created. --- cmd-rename-session.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmd-rename-session.c') diff --git a/cmd-rename-session.c b/cmd-rename-session.c index 018e537f..cbda700f 100644 --- a/cmd-rename-session.c +++ b/cmd-rename-session.c @@ -46,6 +46,10 @@ cmd_rename_session_exec(struct cmd *self, struct cmd_ctx *ctx) const char *newname; newname = args->argv[0]; + if (!session_check_name(newname)) { + ctx->error(ctx, "bad session name: %s", newname); + return (-1); + } if (session_find(newname) != NULL) { ctx->error(ctx, "duplicate session: %s", newname); return (-1); -- cgit v1.2.3