BridgeDB is parsing PTs from `cached-extrainfo*` files cumulatively
This is causing a bridge whose extrainfo descriptor is in both cached-extrainfo
and cached-extrainfo.new
to have its transport
lines added twice to BridgeDB's list of pluggable transports. This is likely what was causing #9264 (moved).
This is easily reproducible: simply generate some fake descriptors, copy the cached-extrainfo.new
file to cached-extrainfo
(each fake descriptor currently always has exactly two transport
lines -- one obfs2
and one obfs3
), and start bridgedb:
git clone https://gitweb.torproject.org/bridgedb.git && cd bridgedb && make install
pip install leekspin
generate-OR-descriptors -n 50
cp cached-extrainfo.new cached-extrainfo
bridgedb
If you do tail -f bridgedb.log
, you'll see the following lines confirming the bug:
Mar 14 04:14:14 [DEBUG] 836f58807dc44a248c684da0be18b918badef421 supports 4 transports
Mar 14 04:14:14 [DEBUG] e79da1d32ad16e000149449ea191a0e4baa32ca0 supports 4 transports
Mar 14 04:14:14 [DEBUG] 8de1a8fb8c0e2d1885fd05e39541a50a507685ff supports 4 transports
Mar 14 04:14:14 [DEBUG] d0ee79b3bad89ebe6cb1e833e8ba8003ad315e06 supports 4 transports
Mar 14 04:14:14 [DEBUG] Saving state to: '/home/isis/code/torproject/bridgedb/run-manual/bridgedb.state'