[tor-bugs] #18959 [Core Tor/Stem]: Poor error when unable to read the auth cookie
Tor Bug Tracker & Wiki
blackhole at torproject.org
Tue May 3 20:11:01 UTC 2016
#18959: Poor error when unable to read the auth cookie
-------------------------------+--------------------
Reporter: atagar | Owner: atagar
Type: defect | Status: new
Priority: Low | Milestone:
Component: Core Tor/Stem | Version:
Severity: Minor | Keywords:
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
-------------------------------+--------------------
umoukun on irc points out that when your user can't read tor's auth cookie
stem fails with...
{{{
stem.connection.UnreadableCookieFile: Authentication failed:
'/var/run/tor/control.authcookie' doesn't exist
}}}
Trouble looks to be that
[https://gitweb.torproject.org/stem.git/tree/stem/connection.py#n1080
_read_cookie()] uses
[https://docs.python.org/2/library/os.path.html#os.path.exists
os.path.exists()] which returns False if the file's not readable. We
should perform a second permission check.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/18959>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list