From 4f54b12ee1d5d8d82838653d272aea4cfb171442 Mon Sep 17 00:00:00 2001 From: evilsocket Date: Wed, 20 Mar 2019 13:36:44 +0100 Subject: [PATCH] fix: fixed a bug which prevented 'set alias MAC ""' to clear an alias --- session/session_core_handlers.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/session/session_core_handlers.go b/session/session_core_handlers.go index 1a8fa83e..13f48419 100644 --- a/session/session_core_handlers.go +++ b/session/session_core_handlers.go @@ -274,6 +274,9 @@ func (s *Session) shHandler(args []string, sess *Session) error { func (s *Session) aliasHandler(args []string, sess *Session) error { mac := args[0] alias := str.Trim(args[1]) + if alias == "\"\"" || alias == "''" { + alias = "" + } s.Lan.SetAliasFor(mac, alias) return nil }