From 288fb921f05854ade88123e628997b73aa2e47cc Mon Sep 17 00:00:00 2001 From: MadcowOG Date: Tue, 28 Jun 2022 17:15:04 -0700 Subject: [PATCH] Fixed issue with password parsing. When parsing control.conf or password file, a newline character is picked up causing Authentication Errors. --- app/request.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/request.py b/app/request.py index 5bab1ac..aa2003b 100644 --- a/app/request.py +++ b/app/request.py @@ -56,7 +56,9 @@ def send_tor_signal(signal: Signal) -> bool: # Scan for the last line of the file. for line in conf: pass - secret = line.strip('\n') + secret = line + if ( '\n' in line ): + secret = line.strip('\n') authenticate_password(c, password=secret) else: cookie_path = '/var/lib/tor/control_auth_cookie'