From 3e70dd61340b02dd062709c2345445212e44dedd Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sat, 2 Jul 2022 09:33:05 +0200 Subject: [PATCH] Fixed --no-auth option in rncp --- RNS/Utilities/rncp.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/RNS/Utilities/rncp.py b/RNS/Utilities/rncp.py index de4442e..ff29a07 100644 --- a/RNS/Utilities/rncp.py +++ b/RNS/Utilities/rncp.py @@ -34,7 +34,7 @@ APP_NAME = "rncp" allow_all = False allowed_identity_hashes = [] -def receive(configdir, verbosity = 0, quietness = 0, allowed = [], display_identity = False, limit = None, disable_auth = None,disable_announce=False): +def receive(configdir, verbosity = 0, quietness = 0, allowed = [], display_identity = False, limit = None, disable_auth = None, disable_announce = False): global allow_all, allowed_identity_hashes identity = None @@ -99,8 +99,11 @@ def receive_sender_identified(link, identity): if identity.hash in allowed_identity_hashes: RNS.log("Authenticated sender", RNS.LOG_VERBOSE) else: - RNS.log("Sender not allowed, tearing down link", RNS.LOG_VERBOSE) - link.teardown() + if not allow_all: + RNS.log("Sender not allowed, tearing down link", RNS.LOG_VERBOSE) + link.teardown() + else: + pass def receive_resource_callback(resource): sender_identity = resource.link.get_remote_identity()