| changeset | 98011edc6c60 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | refactor: remove duplicate code block Had the same code inside two different if statements. Replaced with 'if X in [ a, b ] ' and only one copy of the code. |
| files |
| changeset | 6bd11a73f2ed |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | issue2551253. default hash is PBKDF2-SHA512. The default password hashing algorithm has been upgraded to PBKDF2-SHA512 from PBKDF2-SHA1. The default pbkdf2 rounds in the config file has been changed to 250000. Doc updated. |
| files |
| changeset | 1b326a3d76b4 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | chore(lint): cleanups from ruff. |
| files |
| changeset | 897c23876e9f |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | doc: fix spelling in comment. |
| files |
| changeset | 70a6ee453ddc |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | fix: fix failing test when crypt is missing. In 3.13 crypt is gone and there is no replacement as it's supplied by a .so as _crypt. Don't hardcode the crypt method in the array, add it (next to last) only if crypt was detected. |
| files |
| changeset | a2ecc31c43ac |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | flake8: correct continutation line indent |
| files |
| changeset | 770fffae8167 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Fix random_ import to use from import rather than import as |
| files |
| changeset | 57f34b0b912c |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | flake8 fixes move import to top, indentation, remove trailing whitespace ... |
| files |
| changeset | 78c3f4aced76 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | issue2551265 - deprecate SSHA password hash method Users using SSHA passwords will have their passwords transprently upgraded to PBKDF2 derived hash on next login. |
| files |
| changeset | 594b562ca99c |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | flake8 cleanups |
| files |
| changeset | 07ce4e4110f5 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | flake8 fixes: whitespace, remove unused imports |
| files |
| changeset | 4d83f9f751ff |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Refeactor PBKDF2 and PBKDF2S5 to reuse code; fix python password.py 90% of the code for these two paths in encodePassword is identical. Combine the identical parts of the code. When password.py is called directly, it runs tests. But the sys.path is messed up so that roundup/cgi is imported during execution rather than pythonlib/cgi.py leading to an import error during setup. This issue does not occur if the tests are run under pytest. |
| files |
| changeset | da751d3a2138 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | issue2551253 - Modify password PBKDF2 method to use SHA512 Added new PBKDF2S5 using PBKDF2 with SHA512 rather than the original PBKDF2 which used SHA1. Currently changes to interfaces.py are required to use it. If we choose to adopt it, need to decide if mechanisms will be available via config.ini to choose methods and force migration. |
| files |
| changeset | 8e8d111fcdcd |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Make in file tests work again. Also allow manual testing without overriding PBKDF rounds |
| files |
| changeset | 8b2287d850c8 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Fix round check/settings in needs_migration Support test rounds in needs_migration Two test were missing os.environ seting to have them use config setting. |
| files |
| changeset | 2de72f75f2f8 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Production PBKDF rounds back to 2M, test 1k; fix empty_form (python2) |
| files |
| changeset | d787f7282ea3 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Move imports to top of file out of test code path. See if this helps with time regression under python2. |
| files |
| changeset | f6b24a8524cd |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Modify code to reduce runtime when testing The prior change to set default number of PBKDF2 rounds to 2000000 (2M) raised runtime in CI from 12 minutes to an hour. This commit checks to see if we are invoked from a pytest test using: if ("pytest" in sys.modules and "PYTEST_CURRENT_TEST" in os.environ): when no config object is present. I assume that the number of times we have a full config object is less than with a missing config object. See if this brings CI runtimes back down. It reduces runtimes on my local box, but.... Code adapted from https://stackoverflow.com/questions/25188119/test-if-code-is-executed-from-within-a-py-test-session/44595269# |
| files |
| changeset | 970cd6d2b8ea |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | issue2551251 - migrate pbkdf2 passwords if more rounds configured migrate/re-encrypt PBKDF2 password if stored password used a smaller number of rounds than set in password_pbkdf2_default_rounds. Also increase fallback number of rounds (when not set in config) to 2,000,000. |
| files |
| changeset | 0b52ee664580 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | tests are breaking with last commit. Restore a hopefully working tree while I figure out what's going on |
| files |
| changeset | cfdcaf8b5936 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | issue2551251 - migrate pbkdf2 passwords if more rounds configured migrate/re-encrypt PBKDF2 password if stored password used a smaller number of rounds than set in password_pbkdf2_default_rounds. Also increase fallback number of rounds (when not set in config) to 2,000,000. |
| files |
| changeset | aa629aebac41 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | flake8 - import order, spacing |
| files |
| changeset | 469ad03e6cb8 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Ignore crypt deprication warning I know it's going away. It's guarded by a try block. No need to keep reporting it. |
| files |
| changeset | 120b0bb05b6e |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | issue2551191 - Module deprication PEP 594. crypt Handle missing crypt module "better" by raising an exception rather than just silently failing to log in the user when a crypt encoded password can't be checked. Update tests and upgrading.txt too. |
| files |
| changeset | 01e9634b81a4 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Christof Meerwald <cmeerw@cmeerw.org> |
| description | fixed string encoding of SSHA encoded passwords in Python 3 |
| files |
| changeset | e27a240430b8 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | flake8 formatting changes. |
| files |
| changeset | 6c3826600610 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Bandit - silence old hash warnings. They are not recommended. Kept for older installs. Newer installs get upgraded password storage using PBKDF2. |
| files |
| changeset | 07abc8d36940 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Add etag support to rest interface to prevent multiple users from overwriting other users changes. All GET requests for an object (issue, user, keyword etc.) or a property of an object (e.g the title of an issue) return the etag for the object in the ETag header as well as the @etag field in the returned object. All requests that change existing objects (DELETE, PUT or PATCH) require: 1 A request include an ETag header with the etag value retrieved for the object. 2 A submits a form that includes the field @etag that must have the value retrieved for the object. If an etag is not supplied by one of these methods, or any supplied etag does not match the etag calculated at the time the DELETE, PUT or PATCH request is made, HTTP error 412 (Precondition Failed) is returned and no change is made. At that time the client code should retrieve the object again, reconcile the changes and can try to send a new update. The etag is the md5 hash of the representation (repr()) of the object retrieved from the database. |
| files |
| changeset | 11a1afa3cba4 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Christof Meerwald <cmeerw@cmeerw.org> |
| description | removed unused import of os module |
| files |
| changeset | 52cb53eedf77 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Christof Meerwald <cmeerw@cmeerw.org> |
| description | reworked random number use prefer secrets module from Python 3.6+, random.SystemRandom and finally plain random |
| files |
| changeset | 3d0f71775e42 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Christof Meerwald <cmeerw@cmeerw.org> |
| description | use PBKDF2 implementation from Python's hashlib, if available see issue2550982 |
| files |
| changeset | fbbcbfc6dad0 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Christof Meerwald <cmeerw@cmeerw.org> |
| description | fix encoding for hash functions |
| files |
| changeset | 1f1899658115 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Joseph Myers <jsm@polyomino.org.uk> |
| description | Python 3 preparation: use bytes more in password handling. This patch adds enough fixes to use bytes to work for PBKDF2 passwords, but probably not for the other hash algorithms supported. It would make sense for the PBKDF2 code to use the Python hashlib support for PBKDF2 as the first choice before M2Crypto and the local PBKDF2 implementation (hashlib supports it in 2.7.8, 3.4 and later), but it still seems appropriate to fix the local code to handle bytes properly anyway. |
| files |
| changeset | 56c9bcdea47f |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Joseph Myers <jsm@polyomino.org.uk> |
| description | Python 3 preparation: unicode. This patch introduces roundup/anypy/strings.py, which has a comment explaining the string representations generally used and common functions to handle the required conversions. Places in the code that explicitly reference the "unicode" type / built-in function are generally changed to use the new functions (or, in a few places where those new functions don't seem to fit well, other approaches such as references to type(u'') or use of the codecs module). This patch does not generally attempt to address text conversions in any places not currently referencing the "unicode" type (although scripts/import_sf.py is made to use binary I/O in places as fixing the "unicode" reference didn't seem coherent otherwise). |
| files |
| changeset | 2d6a92c3e212 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Joseph Myers <jsm@polyomino.org.uk> |
| description | Python 3 preparation: use string.ascii_letters instead of string.letters. |
| files |
| changeset | 3fa026621f69 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Joseph Myers <jsm@polyomino.org.uk> |
| description | Python 3 preparation: comparisons. Python 3 no longer has the cmp function, or cmp= arguments to sorting functions / methods (key= must be used instead), and requires rich comparison methods such as __lt__ to be defined instead of using __cmp__. All of the comparison mechanisms supported in Python 3 are also supported in Python 2. This patch makes the corresponding changes in Roundup to use key functions and rich comparison methods. In the case of the JournalPassword and Permission classes, only __eq__ and __ne__ are defined as I don't see ordered comparisons as useful there (and for Permission, the old __cmp__ function didn't try to provide a valid ordering). In the case of the Date class, I kept the __cmp__ method and implemented the others in terms of it, to avoid excess repetitiveness in duplicating implementation code for all six rich comparison methods. In roundup/admin.py, help_commands_html used operator.attrgetter to produce the second argument of sorted() - which would be reasonable for a key function, but the second argument is the cmp function in Python 2, not a key function (and the key function must be a named argument not a positional argument in Python 3). That function appears to be completely unused, so I expect that code never worked. This patch adds the missing key= to that sorted() call, but it would also be reasonable to remove the unused function completely instead. |
| files |
| changeset | a391a071d045 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Joseph Myers <jsm@polyomino.org.uk> |
| description | Python 3 preparation: use range() instead of xrange(). Tool-assisted patch. None of the existing range() uses seem to need to be wrapped in list(). Note that range() may be less efficient than xrange() in Python 2. |
| files |
| changeset | 35ea9b1efc14 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Joseph Myers <jsm@polyomino.org.uk> |
| description | Python 3 preparation: "raise" syntax. Changing "raise Exception, value" to "raise Exception(value)". Tool-assisted patch. Particular cases to check carefully are the one place in frontends/ZRoundup/ZRoundup.py where a string exception needed to be fixed, and the one in roundup/cgi/client.py involving raising an exception with a traceback (requires three-argument form of raise in Python 2, which as I understand it requires exec() to avoid a Python 3 syntax error). |
| files |
| changeset | 91954be46a66 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | A real fix for the problem where: import random would result in every call to random() returning the same value in the web interface. While cgi/client.py:Client::__init.py__ was calling random.seed(), on most systems random was SystemRandom and not the default random. As a result the random as you would get from: import random was never being seeded. I added a function to access and seed the random bound instance of random.Random that is called during init. This fixes all three places where I saw the broken randomness. It should also fix: http://psf.upfronthosting.co.za/roundup/meta/issue644 I also removed the prior code that would bail if systemRandom was not available. |
| files |
| changeset | 66a17c80e035 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | Force all uses of random to use SystemRandom and abort if pseudorandom random.Random would be used rather than Random.SystemRandom. random.Random is returning the same value time after time. Even when being seeded after instantiation, calls to the random.random() function return the same value like it's not advanceing the state of the generator. So "fix" is to force use of system random generator to generate: one time keys for password reset (action.py) random passwords when resetting passwords (password.py) serial number for auto ssl cert generation (roundup_server.py) Message-ID's in email: mailgw.py, client.py anti-csrf nonces (templating.py) |
| files |
| changeset | 9792b18e0b19 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Rouillard <rouilj@ieee.org> |
| description | issue 2550880: Ability to choose password store scheme and SSHA support. Discussion on list is tending in favor of this patch. Embedded test works, my manual test with a SSHA password assigned to a user allowed the user to log in. Ran the test suite and the tests that were not skipped passed. |
| files |
| changeset | 9ba03348f923 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | John Kristensen <john@jerrykan.com> |
| description | Remove roundup/anypy/hashlib_.py The hashlib_ module was being used to provide backwards compatibility for python v2.4. Roundup has dropped support for python v2.4 so we can get rid of it. |
| files |
| changeset | efdce3d32698 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | anatoly techtonik <techtonik@gmail.com> |
| description | Increase generated password length to 12 symbols. Make sure at least one digit is present. See article of Georgia Tech Research Institute at http://goo.gl/olFxy for more information. |
| files |
| changeset | 2f66d44616ad |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | anatoly techtonik <techtonik@gmail.com> |
| description | windows: Fix failing password tests due to missing crypt module |
| files |
| changeset | 6e3e4f24c753 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Eric S. Raymond <esr@thyrsus.com> |
| description | Remove keyword expansions from CVS. All regression tests passed afterwards. |
| files |
| changeset | 357c6079c73b |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
| description | python2.4 compatibility fix |
| files |
| changeset | 693c75d56ebe |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
| description | Add new config-option 'password_pbkdf2_default_rounds'... ...in 'main' section to configure the default parameter for new password generation. Set this to a higher value on faster systems which want more security. Thanks to Eli Collins for implementing this (see issue2550688). This now passes a config object (default None in which case we fall back to hard-coded parameters) into the password generation routine. This way we can add further parameters for password generation in the future. Also added a small regression test for this new feature. |
| files |
| changeset | 95aace124a8e |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
| description | use idea from Eli Collins to use a list of deprecated password encoding schemes |
| files |
| changeset | 52e13bf0bb40 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
| description | Add new config-option 'migrate_passwords' in section 'web'... ...to auto-migrate passwords at web-login time. Default for the new option is "yes" so if you don't want that passwords are auto-migrated to a more secure password scheme on user login, set this to "no" before running your tracker(s) after the upgrade. |
| files |
| changeset | 22bc0426e348 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
| description | Second patch from issue2550688 -- with some changes: - password.py now has a second class JournalPassword used for journal storage. We have some backends that directly store serialized python objects. Also when reading from the journal some backends expected the string read to be usable as a parameter to a Password constructor. This now calls a JournalPassword constructor in all these cases. The new JournalPassword just keeps the scheme and has an empty password. - some factoring, move redundant implementation of "history" from rdbms_common and back_anydbm to hyperdb. |
| files |
| changeset | 1613754d2646 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
| description | Fix first part of Password handling security issue2550688 (thanks Joseph Myers for reporting and Eli Collins for fixing) Small change against original patch: We still accept plaintext passwords (in known_schemes) when parsing encrypted password (e.g. from database). This way existing databases with plaintext passwords continue to work (I don't know of any, this would need patching on the users side) and all regression tests pass. |
| files |
| changeset | eddb82d0964c |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | Add compatibility package to allow us to deal with Python versions 2.3..2.6. Outstanding issues noted in roundup/anypy/TODO.txt |
| files |
| changeset | 822a2719b81b |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Alexander Smishlajev <a1s@users.sourceforge.net> |
| description | keep plaintext password in Password object property (rfe [SF#1379447]) |
| files |
| changeset | 1f860b50fa5f |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Alexander Smishlajev <a1s@users.sourceforge.net> |
| description | encodePassword: don't trim the salt string... ...the first two characters aren't enough for MD5-based crypt implementations [SF#1372253] |
| files |
| changeset | c9e52addda42 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | added MD5 scheme for password hiding |
| files |
| changeset | 18addf2a8596 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | Implemented proper datatypes in mysql and postgresql backends... ...(well, sqlite too, but that doesn't care). Probably should use BOOLEAN instead of INTEGER for the Boolean props. Need to fix a bizzaro MySQL error (gee, how unusual) Need to finish MySQL migration from "version 1" database schemas. |
| files |
| changeset | fc52d57c6c3e |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | documentation cleanup |
| files |
| changeset | dc43e339e607 |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | Centralised conversion of user-input data to hyperdb values (bug [SF#802405], bug [SF#817217], rfe [SF#816994]) |
| files |
| changeset | 6d1af2e441f4 |
|---|---|
| branch | maint-0.5 |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | email registered users shouldn't be able to log in [SF#714673] |
| files |
| changeset | caae7d8934dc |
|---|---|
| branch | |
| bookmark | |
| tag | |
| user | Richard Jones <richard@users.sourceforge.net> |
| description | set new email rego user password to random string |
| files |