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

isislovecruft / bridgedb
66%
develop: 91%

Build:
Build:
LAST BUILD BRANCH: bridgedb-0.6.5
DEFAULT BRANCH: develop
Repo Added 19 Nov 2013 12:13AM UTC
Files 44
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

LAST BUILD ON BRANCH hotfix/11215_12147-intervalstart
branch: hotfix/11215_12147-intervalstart
CHANGE BRANCH
x
Reset
  • hotfix/11215_12147-intervalstart
  • bridgedb-0.1.0
  • bridgedb-0.1.1
  • bridgedb-0.1.2
  • bridgedb-0.1.3
  • bridgedb-0.1.4
  • bridgedb-0.2.1
  • bridgedb-0.2.2
  • bridgedb-0.2.3
  • bridgedb-0.2.4
  • bridgedb-0.3.0
  • bridgedb-0.3.1
  • bridgedb-0.3.2
  • bridgedb-0.3.4
  • bridgedb-0.3.5
  • bridgedb-0.3.6
  • bridgedb-0.3.7
  • bridgedb-0.6.1
  • bridgedb-0.6.2
  • bridgedb-0.6.3
  • bridgedb-0.6.4
  • bridgedb-0.6.5
  • develop
  • develop_copy
  • feature/10724-collect-timestamps-option
  • feature/25246
  • feature/7520-social-dist-design_r1
  • feature/9865-test-harness-coverage
  • feature/sphinx-docs
  • fix/0.2.3-readme-testing-instructions
  • fix/10385-python-gnupg
  • fix/10385-python-gnupg_r1
  • fix/10559-keyid-in-pt-lines
  • fix/10737-post-args-redirects
  • fix/10803-remove-vidalia-update-options
  • fix/10809-gimp-captcha
  • fix/10809-gimp-captcha_r1
  • fix/10811-add-SIGUSR1-handler
  • fix/11127-recaptcha-ssl
  • fix/11127-recaptcha-ssl_10809r1_r1
  • fix/11139-riseup
  • fix/11139-riseup_r1
  • fix/11215-captcha-timeouts
  • fix/11231-additional-bug-fixes
  • fix/11345-qrcodes_r2
  • fix/11346-homepage-link
  • fix/11522-exc-in-email-dist
  • fix/11664-email-buffer-interface
  • fix/12029-distribute-module
  • fix/12029-distribute-module_8
  • fix/12029-distribute-module_9
  • fix/12029-refactor-Bridges
  • fix/12031-redis_r2
  • fix/12086-rcptto-other-domain
  • fix/12091-dkim-dunno
  • fix/12122-translator-notes
  • fix/12504-config-pts
  • fix/12505-11330-hashrings
  • fix/12505-12029-11330-hashrings
  • fix/12505-12029-11330-hashrings_r1
  • fix/12505-12029-11330-hashrings_r2
  • fix/12505-12029-11330-hashrings_r3
  • fix/12505-12029-11330-hashrings_r4
  • fix/12505-12029-11330-hashrings_r5
  • fix/12505-12029-11330-hashrings_r6
  • fix/12505-12029-11330-hashrings_r7
  • fix/12505-12029-11330-hashrings_r8
  • fix/12505-5418-remove-old-block-code
  • fix/12505-refactor-hashrings
  • fix/12505-refactor-hashrings_r2
  • fix/12505-refactor-hashrings_r3
  • fix/12505-refactor-hashrings_r4
  • fix/12505-refactor-hashrings_r5
  • fix/12505-refactor-hashrings_r6
  • fix/12505-refactor-hashrings_r7
  • fix/12506-separate-dist-dirs
  • fix/12506-separate-dist-dirs_6
  • fix/12506-separate-dist-dirs_7
  • fix/12506-separate-dist-dirs_8
  • fix/12506-separate-dist-dirs_9
  • fix/12507-automate-documentation-builds
  • fix/12627-hotfixes
  • fix/12635-tbb-dl-links
  • fix/12664-bridgeline-newlines_r2
  • fix/12709-enable-fte
  • fix/12843-cc-spurning
  • fix/12843-cc-spurning_r2
  • fix/12872-bridge-geoip
  • fix/12872-bridge-geoip_r1
  • fix/12932-pt-args-spaces
  • fix/13123-bridgeline-spaces
  • fix/13202-missing-pt-args
  • fix/14064-bridgeline-wrapping_r2
  • fix/14065-vanilla-ipv6
  • fix/14685-disable-obfs2
  • fix/14865-disable-obfs2
  • fix/15155-instructions-string
  • fix/15464-ci-directives
  • fix/15464-ci-directives_r1
  • fix/15522-ipv6-enumeration
  • fix/15866-broken-bridgeauth
  • fix/1606-based-on_bug1606_spec_update_rebased_r1
  • fix/16273-gitweb-urls
  • fix/16330-eid-sds-2-fields
  • fix/16616-hsdir-flag
  • fix/18237
  • fix/1839-rotation-periods
  • fix/18949
  • fix/19691
  • fix/22871_r1
  • fix/24432-ignore-loopback
  • fix/24432-json-str
  • fix/24433
  • fix/24460
  • fix/24636
  • fix/24637
  • fix/24701
  • fix/24704
  • fix/26023
  • fix/3015-remove-buckets
  • fix/4405-tor-exit-check_2_r1
  • fix/4771-log-tor-exits
  • fix/4771-log-tor-exits_r1
  • fix/5463-7547-7550-8241-11475-11753-email-rewrite
  • fix/5463-gpgme-homedir
  • fix/5463-sign-client-email-addr
  • fix/6127-render_GET-traceback
  • fix/6127-web-server-tracebacks
  • fix/7550-9678-interactive-translations
  • fix/9013_r1
  • fix/9127-https-interface-ipv6
  • fix/9199-safelogging
  • fix/9380-stem_r10
  • fix/9380-stem_r3
  • fix/9380-stem_r4
  • fix/9380-stem_r5
  • fix/9380-stem_r7
  • fix/9380-stem_r8
  • fix/9380-stem_r9
  • fix/9385-fuzzy-email-matching
  • fix/9385-fuzzy-email-matching_r1
  • fix/9462-refactor-netstatus-parsers_r9462C
  • fix/9462-refactor-netstatus-parsers_r9462C_r2
  • fix/9462C-ipaddr-portlist-module
  • fix/9873-convert-old-unittests_r3
  • fix/9874-automate-email-tests
  • fix/9874-email
  • fix/9874-https
  • fix/9874-remove-requirements.txt
  • fix/9988-apply-patch
  • fix/9988-rm-hashlibnew
  • fix/make-config.py
  • fix/stability-db
  • hotfix/0.2.1-docstrings
  • hotfix/0.2.3-html-footer-icons
  • hotfix/0.2.4-14797-4405-missing-proxylistfile
  • hotfix/0.2.4-14797-requirements
  • hotfix/0.2.4-14797-var-bulkexitlist
  • hotfix/0.2.4-bump-mako-version
  • hotfix/0.2.4-bump-pygeoip-version
  • hotfix/0.2.4-mechanize-tags
  • hotfix/0.2.4-travis-matrix-update
  • hotfix/0.2.4-travis-pyeggcache
  • hotfix/0.3.0-twisted-14.0.2
  • hotfix/0.3.0-twisted-14.0.2_r1
  • hotfix/0.3.1-9385-levenshtein-distance
  • hotfix/0.3.1-pypy-support
  • hotfix/0.3.2-error-pages
  • hotfix/0.3.2-format-plain-bytes
  • hotfix/0.3.2-pep440
  • hotfix/0.3.2-remove-lib-dir
  • hotfix/10385-init-gpg-ret
  • hotfix/11522-gpg-signing
  • hotfix/12627-additional-unicode-fix
  • hotfix/3.0.0-twisted-14.0.2
  • hotfix/5463-email-line-recieved-logging
  • hotfix/9264-descdigest-none
  • hotfix/9264_2_rtl-2step
  • hotfix/9380-duplicate-extrainfo-error
  • hotfix/9462B-netstatus-returns-None
  • hotfix/9937-desc-gen_base64-padding-descDigest
  • hotfix/remove-sqlitedict-class
  • hotfix/requirements-travis
  • hotfix/ude-persistent
  • master
  • release/0.6.1
  • release/0.6.3
  • rransom/5463-ui-typos
  • rransom/fix/12147-schedule-unittest
  • testing/coveralls-rcfile
  • testing/feature/9865-test-harness-coverage
  • testing/fix/10809-gimp-captcha_r1
  • testing/fix/9462-refactor-netstatus-parsers_r9462C
  • testing/fix/9462-refactor-netstatus-parsers_rdevelop
  • testing/fix/9462C-ipaddr-portlist-module
  • testing/log-memaddrs
  • testing/nondeterminism-smtp-test
  • testing/rm-unused-legacy-test-code
  • testing/sysrqb/bug5232_based_on_fix/9462_r9462C_r2
  • testing/sysrqb/bug5232_based_on_fix/9462_r9462C_r2_test2
  • testing/sysrqb/bug5232_r2_based_on_fix/9462_r9462C_r2
  • testing/sysrqb/bug5232_r2_based_on_fix/9462_r9462C_r2_cherry-pick-44d2bc761c13
  • testing/sysrqb/bug5232_r2_based_on_fix/9462_r9462C_r2_cherry-pick-7bb36dd0857
  • testing/tpo-common/develop
  • testing/tpo-sysrqb/bug9127
  • testing/tpo-sysrqb/bug9264_rebased_0
  • testing/tpo-sysrqb/bug9264_rebased_1
  • testing/tpo-sysrqb/bug9264_rebased_1-test2
  • testing/tpo-sysrqb/bug9264_rebased_3
  • translations/2014-04-24-update
  • translations/2014-04-24-update-pot-file
  • translations/2014-05-07-update
  • translations/2014-05-16-update
  • translations/2014-06-06-update
  • translations/2015-03-19-update
  • translations/2015-03-20-update

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

Relevant lines Covered
Build:
Build:
3909 RELEVANT LINES 2588 COVERED LINES
0.66 HITS PER LINE
Source Files on hotfix/11215_12147-intervalstart
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
391 hotfix/11215_12147-intervalstart 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:1... push 28 May 2014 07:01PM UTC Isis Lovecruft travis-ci pending completion  
See All Builds (827)
  • Repo 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

© 2025 Coveralls, Inc