mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-25 10:27:24 +00:00
Fix --allow-remote-control not working with allow_remote_control=no
This commit is contained in:
parent
5ffc4c6498
commit
e8de2def96
1 changed files with 6 additions and 4 deletions
|
|
@ -453,10 +453,12 @@ class Boss:
|
|||
from .remote_control import is_cmd_allowed, parse_cmd
|
||||
response = None
|
||||
window = window or None
|
||||
if self.allow_remote_control == 'n':
|
||||
return {'ok': False, 'error': 'Remote control is disabled'}
|
||||
if self.allow_remote_control == 'socket-only' and peer_id == 0:
|
||||
return {'ok': False, 'error': 'Remote control is allowed over a socket only'}
|
||||
window_has_remote_control = bool(window and window.allow_remote_control)
|
||||
if not window_has_remote_control:
|
||||
if self.allow_remote_control == 'n':
|
||||
return {'ok': False, 'error': 'Remote control is disabled'}
|
||||
if self.allow_remote_control == 'socket-only' and peer_id == 0:
|
||||
return {'ok': False, 'error': 'Remote control is allowed over a socket only'}
|
||||
try:
|
||||
pcmd = parse_cmd(cmd, self.encryption_key)
|
||||
except Exception as e:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue