mirror of
https://github.com/benbusby/whoogle-search.git
synced 2025-07-09 03:04:13 -04:00
Strip newlines when parsing tor password (#801)
When parsing control.conf or password file, a newline character could cause Authentication Errors.
This commit is contained in:
parent
f688b88bd8
commit
03eeb3fad1
@ -56,7 +56,7 @@ def send_tor_signal(signal: Signal) -> bool:
|
|||||||
# Scan for the last line of the file.
|
# Scan for the last line of the file.
|
||||||
for line in conf:
|
for line in conf:
|
||||||
pass
|
pass
|
||||||
secret = line
|
secret = line.strip('\n')
|
||||||
authenticate_password(c, password=secret)
|
authenticate_password(c, password=secret)
|
||||||
else:
|
else:
|
||||||
cookie_path = '/var/lib/tor/control_auth_cookie'
|
cookie_path = '/var/lib/tor/control_auth_cookie'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user