summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* | Change runner.generateDescriptors() to not need whole options class.Isis Lovecruft2013-11-05
| | | | | | | | | | | | * CHANGE the parameters to bridgedb.runner.generateDescriptors() function to only need specific settings, rather than needing the whole instance of the MainOptions class.
* | Remove commented out logs, add warning log, in bridgedb.Main.Isis Lovecruft2013-11-05
| | | | | | | | | | | | * REMOVE cruft code for a bunch of log statements which used str.join() incorrectly and have been commented out forever anyway. * ADD warning log message if no HTTPS distributor was created.
* | Separate pseudo-distributor dumping into function in bridgedb.runner.Isis Lovecruft2013-11-05
| | | | | | | | | | * MOVE code for dumping bridges in 'unassigned' pseudo-distributor rings to new function, bridgedb.runner.doDumpBridges().
* | Move subCommand handling code to separate function in bridgedb.Main.Isis Lovecruft2013-11-05
| | | | | | | | | | * MOVE code for running options.subCommands and dumping bridge assignments to file to a new function, bridgedb.Main.runSubcommand().
* | Add docstring and use loadConfig() in reload().Isis Lovecruft2013-11-05
| |
* | Add additional log statements to bridgedb.Main.startup().Isis Lovecruft2013-11-05
| | | | | | | | | | * ADD additional log statements to notify when each distributor is setup and when config options are changed on the config instance.
* | PEP8ify one line in bridgedb.Main.startup().Isis Lovecruft2013-11-05
| |
* | Change formatting of two logs in bridgedb.Main to use '%' syntax.Isis Lovecruft2013-11-05
| |
* | Fix bug resulting from use of fd.close() instead of os.close(fd).Isis Lovecruft2013-11-05
| |
* | Remove unused imports from bridgedb.parse.headers.Isis Lovecruft2013-11-05
| |
* | Add loadConfig function for reloading .conf on top of settings.Isis Lovecruft2013-11-05
| | | | | | | | | | | | | | The .conf file must be loaded on top of the configuration instance as it exists in memory, otherwise settings will not be persistent. * FIXES part of #9277.
* | Don't create new loggers in modules loaded into bridgedb.Main.Isis Lovecruft2013-11-05
| | | | | | | | | | | | | | | | If these create their own loggers, and/or are imported as absolute imports specifying the full package name, then the new loggers get created before the root logger is configured. * REMOVE logger creation in bridgedb.parse.headers and bridgedb.crypto.
* | Configure and start logging ASAP in bridgedb.Main.Isis Lovecruft2013-11-05
| | | | | | | | | | | | | | | | | | This is the earliest point at which we have everything we need to call configureLogging(); we probably should not delay it, otherwise we risk losing information on anything happening earlier. * MOVE call to bridgedb.Main.configureLogging() to be as early in the code as possible.
* | Change an assert to a check+log in bridgedb.Main.Isis Lovecruft2013-11-05
| | | | | | | | | | | | | | | | | | | | | | This is done so that if BridgeDB is run with higher-than-default optimization levels, i.e. ``python -O2`` (which strips out assert statements), then the problem will still get logged. * CHANGE an assert statement which checks that a ``Bridges.PluggableTransport`` added to a ``Bridges.Bridge.transports`` list actually got added, into a more explicit, non-assert check with a log statement if it fails.
* | Expand ~s and get the abspath for proxy list files.Isis Lovecruft2013-11-05
| |
* | Make bridgedb.Main._reloadFn placeholder take any arguments.Isis Lovecruft2013-11-05
| | | | | | | | * ADD a docstring to it, not that it is no longer a lambda function.
* | Catch potential KeyErrors on bridge ID lookups in bridgedb.Main.Isis Lovecruft2013-11-05
| | | | | | | | | | | | | | | | | | We should catch the KeyError here, as sometimes this loop gets a bridge ID from an extra-info descriptor and tries to lookup the bridge, causing a KeyError on the lookup. * ADD try/except wrapper to catch KeyErrors on looking up bridges by ID in the bridges dict in bridgedb.Main.load().
* | Fix a bug where bridgedb.Main only opens one extra-info file, not both.Isis Lovecruft2013-11-05
| | | | | | | | | | | | | | | | | | | | | | | | The old config item, EXTRA_INFO_FILE, was changed to a list, EXTRA_INFO_FILES, some time ago, in commit 5c86df37fa1938508144bb52c971a3c31be0b310. However, the config item searched for in bridgedb.Main was not, causing the extra-info descriptor files not to be read. * CHANGE bridgedb.Main to read extra-info descriptor filenames from EXTRA_INFO_FILES config setting, not EXTRA_INFO_FILE. * FIXES bug causing extra-info files not to be read.
* | Remove a log statement from bridgedb.Main.Isis Lovecruft2013-11-05
| | | | | | | | | | | | | | | | Because of the duplicate bridge problem we've been having, this log statement was causing nearly every bridge fingerprint to get recorded to the logfiles every 30 minutes (when BridgeDB is SIGHUPed). * REMOVE a log statement.
* | Fix logs in bridgedb.Main to record the filename that was used.Isis Lovecruft2013-11-05
| | | | | | | | | | | | | | | | | | | | There were a couple loglines in bridgedb.Main, most of them for when the descriptor files are opened/closed, which did ``os.path.abspath`` on the filename string taken from the config, and then logged statements like "Opening something something file: %s" with the absolute path. On the next line, the non-absolute path of the filename is opened. * CHANGE log statements to record paths as they are passed to open().
* | Minor PEP8ification of bridgedb.Main module.Isis Lovecruft2013-11-05
| |
* | Remove bridgedb.Main.CONFIG dictionary.Isis Lovecruft2013-11-05
| | | | | | | | | | | | * REMOVE the hardcoded dict CONFIG from bridgedb.Main, it is not used anywhere, most of the settings are outdated at this point, and all of the settings are in the main config file, bridgedb.conf.
* | Get rid of bridgedb.Main.CONFIG_DEFAULTS dict.Isis Lovecruft2013-11-05
| | | | | | | | | | | | | | | | | | * REMOVE dictionary bridgedb.Main.CONFIG_DEFAULTS of config settings. These are already set, so I don't know why they should be duplicated here. * REMOVE method bridgedb.Main.Conf.setMissing(), which did nothing except for set the config items to the settings from the above mentioned dict if they were missing.
* | Update gen_bridge_descriptors docstrings, add TODO note on making NTOR keys.Isis Lovecruft2013-10-30
| |
* | Update .gitignore to exclude log files even in the top-level dir.Isis Lovecruft2013-10-30
| |
* | Fix the parsing of Accept-Language to actually support fallbacks.Isis Lovecruft2013-10-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All right. Going through the most significant bugs in this function: * The line from the original function: ``langs = request.getHeader('accept-language').split(',')`` getHeader() returns ``None`` if the header isn't present, so this results in a TypeError on the split(). * The line from the original function: ``langs = filter(lambda x: re.match('^[a-z\-]{1,5}', x), langs)`` This chucks locales with capital letters, and doesn't much at all to insure that we're actually getting a well-formed header, all at the expense of a (rather expensive; they're slow in Python) regex call. * These lines from the original: # add fallback languages langs_only = filter(lambda x: '-' in x, langs) langs.extend(map(lambda x: x.split('-')[0], langs_only)) If my 'Accept-Language' header starts with 'en-GB,en-US;q=0.92[…]', then this would add ['en','en'] to the end of my header, without even checking if I already have 'en'. Instead, we should check if 'en' is already there, and iff not, then add it *after the other English headers*. Not after Mandarin, Japanese, Arabic, Russian, and the other slew of languages that I half-assedly learned at some point. * These lines from the original: # gettext wants _, not - map(lambda x: x.replace('-', '_'), langs) Great. A pretty mapping. Good thing the returned values weren't saved as anything; otherwise they might have been useful! * Lastly, the way that languages, once parsed were added to gettext, would raise UnhandledErrors, *and* it didn't even add the fallbacks correctly, meaning we could only get one language at a time.
* | Add better error handling if we cannot reach the Recaptcha server.Isis Lovecruft2013-10-29
| |
* | Handle GPGME errors better in the EmailServer.Isis Lovecruft2013-10-29
| | | | | | | | | | | | * CHANGE getGPGContext() function to output at least some useful information when it encounters an error, rather than just spewing 'Unusable GPG Key' without any context.
* | Merge branch 'feature/cleanup-config' into developIsis Lovecruft2013-10-29
|\ \
| * | Cleanup explanations of options in bridgedb.conf.feature/cleanup-configIsis Lovecruft2013-10-06
|/ /
* | Add logging to crypto module.Isis Lovecruft2013-10-26
| |
* | Fix with combined with os.open; doesn't work on Python2.6.Isis Lovecruft2013-10-26
| |
* | Add bridgedb.test package init file.Isis Lovecruft2013-10-26
| |
* | Move getKey() to crypto module.Isis Lovecruft2013-10-26
| |
* | Use bridgedb.parse.options instead of bridgedb.opt in script.Isis Lovecruft2013-10-26
| |
* | Fix missing import; use less CI resources.Isis Lovecruft2013-10-26
| |
* | Move options parser to bridgedb.parse package and update bridgedb.Main.Isis Lovecruft2013-10-26
| |
* | Use $CWD as the RUN_IN_DIR if unspecified, and update .travis.yml.Isis Lovecruft2013-10-26
| |
* | Update fake bridge descriptor generation commands in .travis.yml.Isis Lovecruft2013-10-26
| |
* | Fix a missing colon.Isis Lovecruft2013-10-26
| |
* | Remove old bridgedb.Opt module.Isis Lovecruft2013-10-26
| |
* | Add placeholder file for lib/bridgedb/test package directory.Isis Lovecruft2013-10-26
| |
* | Add BridgeDB's real GPG public keys.Isis Lovecruft2013-10-26
| | | | | | | | | | | | | | | | * ADD 16384-bit public half of offline certification-only key. * ADD 4096-bit public halves of online signing+encryption keys. * ADD gnupghome/gpg.conf file with settings (both for the fake testing key and the real keys). * ADD gnupghome/* to the .gitignore.
* | Add expired GPG secret subkeys, marked "TESTING (INSECURE!)".Isis Lovecruft2013-10-26
| | | | | | | | | | | | * ADD GPG keys for testing purposes. They are expired, passwordless, marked with the UID "TESTING (INSECURE!) <bridges@bridges.torproject.org>". The (INSECURE!) part tells GnuPG to not waste real entropy when using this key.
* | Update .travis.tml to use new command syntax.Isis Lovecruft2013-10-26
| |
* | Update bridgedb.conf.Isis Lovecruft2013-10-26
| | | | | | | | | | | | | | | | | | * REMOVE RUN_IN_DIR * CHANGE EXTRA_INFO_FILES to a list with the correct filenames. * CHANGE HTTPS options to bind to 127.0.0.1:6789 by default (for testing). * ADD missing HTTP_N_BRIDGES_PER_ANSWER option. * CHANGE to enabling bridge fingerprints by default. * CHANGE to GPG signing emails by default.
* | Update README with new commands.Isis Lovecruft2013-10-26
| | | | | | | | * FIX also the markdown formatting of indented blocks in some places.
* | Fix scripts/gen_bridge_descriptors to create two cached-extrainfo files.Isis Lovecruft2013-10-26
| | | | | | | | | | We usually have 'cached-extrainfo' and 'cached-extrainfo.new', not 'extra-infos'.
* | Merge branch 'feature/9865-test-runner-2-r1' into developIsis Lovecruft2013-10-26
|\ \
| * | Include class for varying the tor versions in generated descriptors.feature/9865-test-runner-2-r1Isis Lovecruft2013-10-26
| | |