Do not allow rename-session to introduce '/' in session names
This commit is contained in:
parent
4a00807ad9
commit
0a081b9f31
|
@ -808,6 +808,9 @@ Server::Server(String session_name)
|
|||
|
||||
bool Server::rename_session(StringView name)
|
||||
{
|
||||
if (contains(name, '/'))
|
||||
throw runtime_error{"Cannot create sessions with '/' in their name"};
|
||||
|
||||
String old_socket_file = format("{}/kakoune/{}/{}", tmpdir(),
|
||||
getpwuid(geteuid())->pw_name, m_session);
|
||||
String new_socket_file = format("{}/kakoune/{}/{}", tmpdir(),
|
||||
|
|
Loading…
Reference in New Issue
Block a user