From 7f00725036cab039ae56bbb28824ad317f6b7af0 Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Sat, 27 Jun 2020 12:56:57 +0200 Subject: [PATCH] Set always localhost to ACL with revpipyload_secure_installation --- revpipyload/secure_installation.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/revpipyload/secure_installation.py b/revpipyload/secure_installation.py index 1b1e82a..55c9016 100755 --- a/revpipyload/secure_installation.py +++ b/revpipyload/secure_installation.py @@ -131,7 +131,8 @@ try: "grant access? (y/N) " ).lower() if cmd == "y": - lst_ip = [] + # Always set local host + lst_ip = ["127.*.*.*,4 "] while True: cmd = input( "Enter single IPv4 address | " @@ -142,7 +143,9 @@ try: save_xmlrpcacls() break elif match(r"([\d*]{1,3}\.){3}[\d*]{1,3}", cmd): - lst_ip.append("{0},4".format(cmd)) + ip_level = "{0},4".format(cmd) + if ip_level not in lst_ip: + lst_ip.append(ip_level) else: stderr.write("Wrong format (0.0.0.0)\n")