Opened 5 years ago

Closed 5 years ago

#5577 closed defect (fixed)

Unrecognized auth method causes IOError

Reported by: atagar Owned by: aagbsn
Priority: Immediate Milestone:
Component: Torctl Version:
Severity: Keywords:
Cc: mikeperry, aagbsn, kaner, karsten, arma, ln5, nickm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

If the PROTOCOLINFO response has an unrecognized method of authentication (such as 'SAFECOOKIE') we raise an IOError which, in turn, breaks connect(). Here's the offending bit of code...

https://gitweb.torproject.org/pytorctl.git/blob/HEAD:/TorCtl.py#l564

This should be a trivial fix and until then the new tor version will make torctl clients very sad.

Child Tickets

Change History (12)

comment:1 in reply to:  description Changed 5 years ago by rransom

Cc: mikeperry aagbsn kaner karsten added

Replying to atagar:

This should be a trivial fix and until then the new tor version will make torctl clients very sad.

In particular, the next Tor 0.2.2.x release will support SAFECOOKIE.

(CCing everyone who is significantly involved with PyTorCtl or Python stuff that uses it.)

comment:2 Changed 5 years ago by rransom

Cc: arma ln5 added

CCing Roger and Linus, too, because they run Torperf instances and should probably be informed that PyTorCtl will be incompatible with Tor 0.2.2.36 when that is released.

comment:3 Changed 5 years ago by arma

Cc: nickm added

Ah ha. Hm. Is there any way to fix this point about 0.2.2.36? New stable minor releases shouldn't break, say, all the arm users if we can help it. It's not too late to change our minds. :)

comment:4 Changed 5 years ago by atagar

New stable minor releases shouldn't break, say, all the arm users if we can help it.

I should make another arm release at some point soonish to get out several other bug fixes too so I wouldn't object to bumping up those plans. Arm is already fixed and unaffected by torctl for this (as mentioned on irc I needed to duplicate this torctl functionality in order to add other unmerged torctl features like control socket support).

comment:5 in reply to:  2 Changed 5 years ago by karsten

Replying to rransom:

CCing Roger and Linus, too, because they run Torperf instances and should probably be informed that PyTorCtl will be incompatible with Tor 0.2.2.36 when that is released.

Actually, Linus and I run Torperf instances. They all use Tor 0.2.2.35. What's the suggested workaround? Not upgrade to 0.2.2.36 ever?

comment:6 Changed 5 years ago by Sebastian

I suspect the same goes for all bandwidth authorities

comment:7 Changed 5 years ago by atagar

What's the suggested workaround? Not upgrade to 0.2.2.36 ever?

Or comment out the IOError I cited earlier. This is a one line fix, just replace...
raise IOError("Unrecognized authentication type: %s" % authInfo)

with...
pass # unrecognized auth method

comment:8 in reply to:  7 Changed 5 years ago by karsten

Replying to atagar:

What's the suggested workaround? Not upgrade to 0.2.2.36 ever?

Or comment out the IOError I cited earlier. This is a one line fix, just replace...
raise IOError("Unrecognized authentication type: %s" % authInfo)

with...
pass # unrecognized auth method

Will there be a pytorctl fix? I don't like the idea of making local changes to pytorctl in the three places that are running Torperf. I also don't feel comfortable enough with the pytorctl code to write and test this patch myself.

comment:9 Changed 5 years ago by atagar

Owner: set to mikeperry
Status: newassigned

Will there be a pytorctl fix?

Probably. Reassigning to Mike so it's clear that this is in his court.

comment:10 Changed 5 years ago by mikeperry

Status: assignedneeds_review

Dude, there are so many balls in my court I am just going to order a new floor and build over them. I'm already wading through them as it is. Or... Profit? Anybody wanna buy a ball pit?

However, because the fix seems a simple hack of changing the exception to a log message, I just went ahead and pushed it. Hope it works.

Please continue to hassle aagbsn about torflow issues. If he isn't responsive for simple obvious fixes (big rewrites to address minor control port protocol changes don't count), we'll just have to find a new torflow maintainer.

comment:11 Changed 5 years ago by mikeperry

Owner: changed from mikeperry to aagbsn
Status: needs_reviewassigned

mf-ing trac...

comment:12 Changed 5 years ago by mikeperry

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.