From 03eeb3fad16e397ef79a01f3e37f6efbb0e7c2e8 Mon Sep 17 00:00:00 2001 From: MadcowOG <88654251+MadcowOG@users.noreply.github.com> Date: Wed, 6 Jul 2022 15:52:02 +0000 Subject: [PATCH] Strip newlines when parsing tor password (#801) When parsing control.conf or password file, a newline character could cause Authentication Errors. --- app/request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/request.py b/app/request.py index 188efa6..5bab1ac 100644 --- a/app/request.py +++ b/app/request.py @@ -56,7 +56,7 @@ def send_tor_signal(signal: Signal) -> bool: # Scan for the last line of the file. for line in conf: pass - secret = line + secret = line.strip('\n') authenticate_password(c, password=secret) else: cookie_path = '/var/lib/tor/control_auth_cookie'