mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
more sanitization for user inputs
This commit is contained in:
parent
94c2572cb5
commit
e659cadf48
1 changed files with 3 additions and 1 deletions
|
@ -5375,7 +5375,7 @@ def setuptunnel(global_memory, has_sd):
|
||||||
else:
|
else:
|
||||||
print("Starting Cloudflare Tunnel for Linux, please wait...", flush=True)
|
print("Starting Cloudflare Tunnel for Linux, please wait...", flush=True)
|
||||||
tunnelbinary = "./cloudflared-linux-amd64"
|
tunnelbinary = "./cloudflared-linux-amd64"
|
||||||
tunnelproc = subprocess.Popen(f"{tunnelbinary} tunnel --url {httpsaffix}://localhost:{args.port}{ssladd}", text=True, encoding='utf-8', shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE)
|
tunnelproc = subprocess.Popen(f"{tunnelbinary} tunnel --url {httpsaffix}://localhost:{int(args.port)}{ssladd}", text=True, encoding='utf-8', shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE)
|
||||||
time.sleep(10)
|
time.sleep(10)
|
||||||
def tunnel_reader():
|
def tunnel_reader():
|
||||||
nonlocal tunnelproc,tunneloutput,tunnelrawlog
|
nonlocal tunnelproc,tunneloutput,tunnelrawlog
|
||||||
|
@ -5509,6 +5509,8 @@ def load_config_cli(filename):
|
||||||
print("Loading .kcpps configuration file...")
|
print("Loading .kcpps configuration file...")
|
||||||
with open(filename, 'r', encoding='utf-8', errors='ignore') as f:
|
with open(filename, 'r', encoding='utf-8', errors='ignore') as f:
|
||||||
config = json.load(f)
|
config = json.load(f)
|
||||||
|
if "onready" in config:
|
||||||
|
config["onready"] = "" #do not allow onready commands from config
|
||||||
args.istemplate = False
|
args.istemplate = False
|
||||||
raw_args = (sys.argv[1:]) #a lousy hack to allow for overriding kcpps
|
raw_args = (sys.argv[1:]) #a lousy hack to allow for overriding kcpps
|
||||||
for key, value in config.items():
|
for key, value in config.items():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue