mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-02-17 12:10:49 +01:00
Prevent remote-mode-forbidden actions server-side
Since some user interface buttons are disabled while in --remote mode, they should also be disabled in aiserver.py so a malicious user can't manually send those commands to the server.
This commit is contained in:
parent
8ae9304cda
commit
6bd6415749
@ -610,11 +610,11 @@ def get_message(msg):
|
||||
deleterequest()
|
||||
elif(msg['cmd'] == 'memory'):
|
||||
togglememorymode()
|
||||
elif(msg['cmd'] == 'savetofile'):
|
||||
elif(not vars.remote and msg['cmd'] == 'savetofile'):
|
||||
savetofile()
|
||||
elif(msg['cmd'] == 'loadfromfile'):
|
||||
elif(not vars.remote and msg['cmd'] == 'loadfromfile'):
|
||||
loadfromfile()
|
||||
elif(msg['cmd'] == 'import'):
|
||||
elif(not vars.remote and msg['cmd'] == 'import'):
|
||||
importRequest()
|
||||
elif(msg['cmd'] == 'newgame'):
|
||||
newGameRequest()
|
||||
@ -755,7 +755,7 @@ def get_message(msg):
|
||||
vars.adventure = msg['data']
|
||||
settingschanged()
|
||||
refresh_settings()
|
||||
elif(msg['cmd'] == 'importwi'):
|
||||
elif(not vars.remote and msg['cmd'] == 'importwi'):
|
||||
wiimportrequest()
|
||||
|
||||
#==================================================================#
|
||||
|
Loading…
x
Reference in New Issue
Block a user