• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

isislovecruft / bridgedb / 391
66%
develop: 91%

Build:
Build:
LAST BUILD BRANCH: bridgedb-0.6.5
DEFAULT BRANCH: develop
Ran 28 May 2014 07:01PM UTC
Jobs 1
Files 27
Run time 13s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
391

push

travis-ci

Isis Lovecruft
Call schedule.intervalStart() to get epoch for HTTPS bridge request.

The ``epoch`` of a request is a value that is supposed to be the
interval of time which the request occurred within, i.e. a request at
14:18 is in the 10-minute interval of 14:10-14:20. This ``epoch`` is
used to obtain bridges in response to a client's request, specifically,
it's a parameter to the ``bridgedb.Dist.getBridgesForIP()`` method,
which does all the real work.

In implementation (up until a couple weeks ago), there was an odd thing
in that a request's ``epoch`` was always hardcoded to be ``"1970"``. I
changed the part which returns ``"1970"`` to return an ISO-8601
timestamp, under the assumtion that anything asking for an interval
would use the ``intervalStart()`` or ``nextIntervalStarts()`` methods to
compare the curr ent timestamp to the interval it should reside
within. My assumption was wrong; in ``bridgedb.Dist.getBridgesForIP()``,
in the first line of that method, ``schedule.getInterval()`` is called
instead. I had even made an XXX note a long time ago stating that this
was a dumb thing to do. I forgot to change it. Oops.

The fix is to change the first line of
``bridgedb.Dist.getBridgesForIP()`` from ``self.schedule.getInterval()``
to ``self.schedule.intervalStarts()` `.  This was also preventing the
CAPTCHA expiration from functioning correctly.

After making this change, it exhibits the correct behaviour, which is,
first, to only respond after determining that we're within the 10-minute
interval in which the CAPTCHA was issued, and second, determine if the
solution to the CATPCHA is correct (and if so give the bridges that we
would give to that IP address cluster, ignoring time intervals
altogether).

 * FIXES #12147
 * THANKS to arma for forwarding to the original bug report to
   tor-assistants@lists.torproject.org.
 * THANKS TO Francisco on IRC for discovering and reporting the issue.

2588 of 3909 relevant lines covered (66.21%)

0.66 hits per line

Jobs
ID Job ID Ran Files Coverage
1 391.1 28 May 2014 07:01PM UTC 0
66.21
Travis Job 391.1
Source Files on build 391
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #391
  • f73deeac on github
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc