| Commit message (Collapse) | Author | Age |
| ... | |
| | |
| |
| |
| |
| |
| |
| | |
* ADD excerpts, from tor-spec.txt and dir-spec.txt, pertaining to encodings
and formats for keys/certs and hash digests, to
gen_bridge_descriptor.makeOnionKeys() function docstring, for clarity,
since the encodings currently used in this function are all kinds of wrong.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
OpenSSL only strictly takes a non-standardized format for timestamps which set
the "Not Valid Before" and "Not Valid After" fields on an x509 certificate. It
*doesn't* take timestamps in Seconds Since Epoch (as I previously had
believed), but only with the strftime format "%Y%m%d%H%M%SZ" (yes, with a
random capital-Z at the end).
OpenSSL *also* doesn't consider the timestamp `0` to be the current time,
contrary to its documentation.
* FIXES a bug in gen_bridge_descriptors where all x509 certificates, and the
signatures which their corresponding OpenSSL.crypto.PKeys created, were
invalid due to crazy timestamps.
|
| | |
| |
| |
| |
| | |
* FIX a bug where the newline after 'router-signature' in an OR extra-info
descriptor was missing.
|
| | |
| |
| |
| |
| | |
* FIX the first line of an OR extra-info document, the fingerprint was being
written without the extra spaces removed.
|
| | |
| |
| |
| |
| | |
Also, minimize imports in scripts/bridgedb to precisely what is needed, so as
not to risk errors caused by something being imported too early.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
* CHANGE the parameters to bridgedb.runner.generateDescriptors() function to
only need specific settings, rather than needing the whole instance of the
MainOptions class.
|
| | |
| |
| |
| |
| |
| | |
* 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.
|
| | |
| |
| |
| |
| | |
* MOVE code for dumping bridges in 'unassigned' pseudo-distributor rings to
new function, bridgedb.runner.doDumpBridges().
|
| | |
| |
| |
| |
| | |
* MOVE code for running options.subCommands and dumping bridge assignments to
file to a new function, bridgedb.Main.runSubcommand().
|
| | | |
|
| | |
| |
| |
| |
| | |
* ADD additional log statements to notify when each distributor is setup and
when config options are changed on the config instance.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | | |
|
| | |
| |
| |
| | |
* ADD a docstring to it, not that it is no longer a lambda function.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
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().
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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().
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
* 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.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
* 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.
|
| |\ \ |
|
| |/ / |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|