[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #13202 [Tor]: Figure out a way to deal with bridges missing arguments.
#13202: Figure out a way to deal with bridges missing arguments.
-------------------------+-------------------------------------------------
Reporter: yawning | Owner:
Type: defect | Status: needs_review
Priority: normal | Milestone: Tor: 0.2.???
Component: Tor | Version: Tor: unspecified
Resolution: | Keywords: bridgedb-dist, scramblesuit,
Actual Points: | isis2014Q3Q4, isis2015Q1Q2, bridgedb-0.3.2
Points: | Parent ID:
-------------------------+-------------------------------------------------
Changes (by isis):
* status: assigned => needs_review
* keywords: bridgedb-dist, scramblesuit, isis2014Q3Q4, isis2015Q1Q2 =>
bridgedb-dist, scramblesuit, isis2014Q3Q4, isis2015Q1Q2,
bridgedb-0.3.2
Comment:
Until Tor-0.2.4.x is deprecated and no longer in use, I've placed a
temporary fix in BridgeDB. It isn't elegant or anything, but it works, and
there's a note to this ticket saying that at some point in the future we
can remove it.
The patch is in my `fix/13202-missing-pt-args`
[https://gitweb.torproject.org/user/isis/bridgedb.git/log/?h=fix/13202
-missing-pt-args branch], and basically consists of adding the following
method to the `bridgedb.bridges.PluggableTransport` class, which is called
whenever the `PluggableTransport`'s attributes are checked, which happens
whenever it is updated:
{{{
+ def _checkArguments(self):
+ """This method is a temporary fix for PTs with missing arguments
+ (see `#13202 <https://bugs.torproject.org/13202`_). This method can
+ be removed after Tor-0.2.4.x is deprecated.
+ """
+ # obfs4 requires (iat-mode && (cert || (node-id && public-key))):
+ if self.methodname == 'obfs4':
+ if self.arguments.get('iat-mode'):
+ if (self.arguments.get('cert') or \
+ (self.arguments.get('node-id') and self.arguments.get
('public-key'))):
+ return True
+ # scramblesuit requires (password):
+ elif self.methodname == 'scramblesuit':
+ if self.arguments.get('password'):
+ return True
+ else:
+ return True
+
+ return False
}}}
There are also
[https://gitweb.torproject.org/user/isis/bridgedb.git/commit/?h=fix/13202
-missing-pt-args&id=f4e83a5a5dce2fdf67051e2462e210936b261f92 unittests] to
ensure this behaviour works as expected.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13202#comment:20>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs