http://hg.code.sf.net:8000/p/roundup/code/atom-log/tip/roundup/password.py Mercurial Repository: p/roundup/code: roundup/password.py history 2026-03-26T21:46:19-04:00 refactor: remove duplicate code block http://hg.code.sf.net:8000/p/roundup/code/#changeset-98011edc6c600d0449277ae75f0fc57433714301 John Rouillard rouilj@ieee.org 2026-03-26T21:46:19-04:00 2026-03-26T21:46:19-04:00
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
issue2551253. default hash is PBKDF2-SHA512. http://hg.code.sf.net:8000/p/roundup/code/#changeset-6bd11a73f2ede6bbbfc34d18df864e916ec4330e John Rouillard rouilj@ieee.org 2024-12-30T02:57:46-05:00 2024-12-30T02:57:46-05:00
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
chore(lint): cleanups from ruff. http://hg.code.sf.net:8000/p/roundup/code/#changeset-1b326a3d76b41ac999be13a3a3044a905fce646b John Rouillard rouilj@ieee.org 2024-03-24T15:16:02-04:00 2024-03-24T15:16:02-04:00
changeset 1b326a3d76b4
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description chore(lint): cleanups from ruff.
files
doc: fix spelling in comment. http://hg.code.sf.net:8000/p/roundup/code/#changeset-897c23876e9f3484bb68bfb7150518b7b482b86e John Rouillard rouilj@ieee.org 2024-03-24T13:16:53-04:00 2024-03-24T13:16:53-04:00
changeset 897c23876e9f
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description doc: fix spelling in comment.
files
fix: fix failing test when crypt is missing. http://hg.code.sf.net:8000/p/roundup/code/#changeset-70a6ee453ddc0c4faeacfad71e920ca07191fc54 John Rouillard rouilj@ieee.org 2023-11-20T17:12:46-05:00 2023-11-20T17:12:46-05:00
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
flake8: correct continutation line indent http://hg.code.sf.net:8000/p/roundup/code/#changeset-a2ecc31c43acb5ee1cd6c53e0752be0ceff4a61e John Rouillard rouilj@ieee.org 2023-07-23T23:21:57-04:00 2023-07-23T23:21:57-04:00
changeset a2ecc31c43ac
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description flake8: correct continutation line indent
files
Fix random_ import to use from import rather than import as http://hg.code.sf.net:8000/p/roundup/code/#changeset-770fffae81670444cb972e57485a1b417b884f29 John Rouillard rouilj@ieee.org 2023-05-25T09:38:39-04:00 2023-05-25T09:38:39-04:00
changeset 770fffae8167
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description Fix random_ import to use from import rather than import as
files
flake8 fixes http://hg.code.sf.net:8000/p/roundup/code/#changeset-57f34b0b912cf5dea9cd93e5536878ca0ce39fb3 John Rouillard rouilj@ieee.org 2023-05-07T09:10:10-04:00 2023-05-07T09:10:10-04:00
changeset 57f34b0b912c
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description flake8 fixes

move import to top, indentation, remove trailing whitespace ...
files
issue2551265 - deprecate SSHA password hash method http://hg.code.sf.net:8000/p/roundup/code/#changeset-78c3f4aced766d82450c23837fd6c8e3733f1dcc John Rouillard rouilj@ieee.org 2023-04-01T20:48:02-04:00 2023-04-01T20:48:02-04:00
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
flake8 cleanups http://hg.code.sf.net:8000/p/roundup/code/#changeset-594b562ca99cce7ac04780ac102a748fafbf39b8 John Rouillard rouilj@ieee.org 2023-04-01T20:40:30-04:00 2023-04-01T20:40:30-04:00
changeset 594b562ca99c
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description flake8 cleanups
files
flake8 fixes: whitespace, remove unused imports http://hg.code.sf.net:8000/p/roundup/code/#changeset-07ce4e4110f587bf6a878f9c15a9cb22537969ed John Rouillard rouilj@ieee.org 2023-03-18T14:16:31-04:00 2023-03-18T14:16:31-04:00
changeset 07ce4e4110f5
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description flake8 fixes: whitespace, remove unused imports
files
Refeactor PBKDF2 and PBKDF2S5 to reuse code; fix python password.py http://hg.code.sf.net:8000/p/roundup/code/#changeset-4d83f9f751ff694bc017162a9de3d43055acd0db John Rouillard rouilj@ieee.org 2023-03-12T20:28:53-04:00 2023-03-12T20:28:53-04:00
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
issue2551253 - Modify password PBKDF2 method to use SHA512 http://hg.code.sf.net:8000/p/roundup/code/#changeset-da751d3a213883dceb8de96be35312faeaba119f John Rouillard rouilj@ieee.org 2023-02-28T15:49:47-05:00 2023-02-28T15:49:47-05:00
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
Make in file tests work again. Also allow manual testing without overriding PBKDF rounds http://hg.code.sf.net:8000/p/roundup/code/#changeset-8e8d111fcdcd3fe5d80b84db0558462a7dba9698 John Rouillard rouilj@ieee.org 2023-02-26T23:38:06-05:00 2023-02-26T23:38:06-05:00
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
Fix round check/settings in needs_migration http://hg.code.sf.net:8000/p/roundup/code/#changeset-8b2287d850c8f5d73aeb27bb499d3d5847bb3740 John Rouillard rouilj@ieee.org 2023-02-26T16:17:37-05:00 2023-02-26T16:17:37-05:00
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
Production PBKDF rounds back to 2M, test 1k; fix empty_form (python2) http://hg.code.sf.net:8000/p/roundup/code/#changeset-2de72f75f2f8da0d414197b5304d374d96d7e42b John Rouillard rouilj@ieee.org 2023-02-26T15:38:49-05:00 2023-02-26T15:38:49-05:00
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
Move imports to top of file out of test code path. http://hg.code.sf.net:8000/p/roundup/code/#changeset-d787f7282ea348d95e17ac0c42751c696d75263b John Rouillard rouilj@ieee.org 2023-02-26T11:06:04-05:00 2023-02-26T11:06:04-05:00
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
Modify code to reduce runtime when testing http://hg.code.sf.net:8000/p/roundup/code/#changeset-f6b24a8524cd7bf78e50a891716a39c9c70b3eb4 John Rouillard rouilj@ieee.org 2023-02-25T14:50:34-05:00 2023-02-25T14:50:34-05:00
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
issue2551251 - migrate pbkdf2 passwords if more rounds configured http://hg.code.sf.net:8000/p/roundup/code/#changeset-970cd6d2b8ea21f36c5fa79efc9c298933761445 John Rouillard rouilj@ieee.org 2023-02-23T19:34:39-05:00 2023-02-23T19:34:39-05:00
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
tests are breaking with last commit. Restore a hopefully working tree while I figure out what's going on http://hg.code.sf.net:8000/p/roundup/code/#changeset-0b52ee664580fa1ae995da59b0f1c2354249364a John Rouillard rouilj@ieee.org 2023-02-24T00:37:37-05:00 2023-02-24T00:37:37-05:00
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
issue2551251 - migrate pbkdf2 passwords if more rounds configured http://hg.code.sf.net:8000/p/roundup/code/#changeset-cfdcaf8b59360a13e65a493aeab3e954e33e12d3 John Rouillard rouilj@ieee.org 2023-02-23T19:34:39-05:00 2023-02-23T19:34:39-05:00
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
flake8 - import order, spacing http://hg.code.sf.net:8000/p/roundup/code/#changeset-aa629aebac4170174df7e376507ae032b39fef22 John Rouillard rouilj@ieee.org 2022-09-14T20:23:42-04:00 2022-09-14T20:23:42-04:00
changeset aa629aebac41
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description flake8 - import order, spacing
files
Ignore crypt deprication warning http://hg.code.sf.net:8000/p/roundup/code/#changeset-469ad03e6cb881d1285acee04660eff706ed2471 John Rouillard rouilj@ieee.org 2022-06-22T15:19:35-04:00 2022-06-22T15:19:35-04:00
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
issue2551191 - Module deprication PEP 594. crypt http://hg.code.sf.net:8000/p/roundup/code/#changeset-120b0bb05b6e026f6a7cc2705feff171e37e2ed4 John Rouillard rouilj@ieee.org 2022-03-20T00:05:59-04:00 2022-03-20T00:05:59-04:00
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
fixed string encoding of SSHA encoded passwords in Python 3 http://hg.code.sf.net:8000/p/roundup/code/#changeset-01e9634b81a4fcedcbcd12cc53ed13ba942f13b3 Christof Meerwald cmeerw@cmeerw.org 2020-04-12T21:02:57+01:00 2020-04-12T21:02:57+01:00
changeset 01e9634b81a4
branch
bookmark
tag
user Christof Meerwald <cmeerw@cmeerw.org>
description fixed string encoding of SSHA encoded passwords in Python 3
files
flake8 formatting changes. http://hg.code.sf.net:8000/p/roundup/code/#changeset-e27a240430b82100be31355b0337761aa7a1d24e John Rouillard rouilj@ieee.org 2019-12-28T14:44:54-05:00 2019-12-28T14:44:54-05:00
changeset e27a240430b8
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description flake8 formatting changes.
files
Bandit - silence old hash warnings. http://hg.code.sf.net:8000/p/roundup/code/#changeset-6c38266006106142138a1de0d3b3f3b1f284fc01 John Rouillard rouilj@ieee.org 2019-12-26T21:16:10-05:00 2019-12-26T21:16:10-05:00
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
Add etag support to rest interface to prevent multiple users from http://hg.code.sf.net:8000/p/roundup/code/#changeset-07abc8d36940fe0ac0ff0d0f605ed87f707851d4 John Rouillard rouilj@ieee.org 2019-03-01T22:57:07-05:00 2019-03-01T22:57:07-05:00
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
removed unused import of os module http://hg.code.sf.net:8000/p/roundup/code/#changeset-11a1afa3cba4bc45ddb0b6a27cfdac8b191b8000 Christof Meerwald cmeerw@cmeerw.org 2018-08-05T14:04:47+01:00 2018-08-05T14:04:47+01:00
changeset 11a1afa3cba4
branch
bookmark
tag
user Christof Meerwald <cmeerw@cmeerw.org>
description removed unused import of os module
files
reworked random number use http://hg.code.sf.net:8000/p/roundup/code/#changeset-52cb53eedf777c4c915a89f44a5059285039b6e0 Christof Meerwald cmeerw@cmeerw.org 2018-08-04T22:40:16+01:00 2018-08-04T22:40:16+01:00
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
use PBKDF2 implementation from Python's hashlib, if available http://hg.code.sf.net:8000/p/roundup/code/#changeset-3d0f71775e42cff0d525d6773497698f1898f8fa Christof Meerwald cmeerw@cmeerw.org 2018-08-02T07:19:23+01:00 2018-08-02T07:19:23+01:00
changeset 3d0f71775e42
branch
bookmark
tag
user Christof Meerwald <cmeerw@cmeerw.org>
description use PBKDF2 implementation from Python's hashlib, if available
see issue2550982
files
fix encoding for hash functions http://hg.code.sf.net:8000/p/roundup/code/#changeset-fbbcbfc6dad0adfa0684cdb7ae5af8a9c025434b Christof Meerwald cmeerw@cmeerw.org 2018-07-23T21:40:31+01:00 2018-07-23T21:40:31+01:00
changeset fbbcbfc6dad0
branch
bookmark
tag
user Christof Meerwald <cmeerw@cmeerw.org>
description fix encoding for hash functions
files
Python 3 preparation: use bytes more in password handling. http://hg.code.sf.net:8000/p/roundup/code/#changeset-1f189965811524ee082b7cc0ca3b1add351a045d Joseph Myers jsm@polyomino.org.uk 2018-07-25T09:55:10+00:00 2018-07-25T09:55:10+00:00
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
Python 3 preparation: unicode. http://hg.code.sf.net:8000/p/roundup/code/#changeset-56c9bcdea47f22412e4f0768775d1abea52d19c2 Joseph Myers jsm@polyomino.org.uk 2018-07-25T09:05:58+00:00 2018-07-25T09:05:58+00:00
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
Python 3 preparation: use string.ascii_letters instead of string.letters. http://hg.code.sf.net:8000/p/roundup/code/#changeset-2d6a92c3e21290ad6133f3b48b56c6082c812101 Joseph Myers jsm@polyomino.org.uk 2018-07-25T00:40:26+00:00 2018-07-25T00:40:26+00:00
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
Python 3 preparation: comparisons. http://hg.code.sf.net:8000/p/roundup/code/#changeset-3fa026621f698afc2f2945b733bffd4e03e23d2f Joseph Myers jsm@polyomino.org.uk 2018-07-25T00:39:37+00:00 2018-07-25T00:39:37+00:00
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
Python 3 preparation: use range() instead of xrange(). http://hg.code.sf.net:8000/p/roundup/code/#changeset-a391a071d045c53c3c6a012c1fdb7eb4d7073a23 Joseph Myers jsm@polyomino.org.uk 2018-07-24T23:00:54+00:00 2018-07-24T23:00:54+00:00
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
Python 3 preparation: "raise" syntax. http://hg.code.sf.net:8000/p/roundup/code/#changeset-35ea9b1efc1494f29fb07690e7087686de58e0f3 Joseph Myers jsm@polyomino.org.uk 2018-07-24T21:39:58+00:00 2018-07-24T21:39:58+00:00
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
A real fix for the problem where: http://hg.code.sf.net:8000/p/roundup/code/#changeset-91954be46a66ab9f301cfbabf6cfb9a269d324dd John Rouillard rouilj@ieee.org 2018-07-08T11:34:42-04:00 2018-07-08T11:34:42-04:00
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
Force all uses of random to use SystemRandom and abort if http://hg.code.sf.net:8000/p/roundup/code/#changeset-66a17c80e03503a503efa70475e918c1265ced80 John Rouillard rouilj@ieee.org 2018-07-07T22:02:41-04:00 2018-07-07T22:02:41-04:00
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
issue 2550880: Ability to choose password store scheme and SSHA support. http://hg.code.sf.net:8000/p/roundup/code/#changeset-9792b18e0b1916084802cd06a5e378868713fa86 John Rouillard rouilj@ieee.org 2016-04-16T22:49:38-04:00 2016-04-16T22:49:38-04:00
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
Remove roundup/anypy/hashlib_.py http://hg.code.sf.net:8000/p/roundup/code/#changeset-9ba03348f923f876b8a032c44424692aa5011dd1 John Kristensen john@jerrykan.com 2014-05-09T17:32:44+10:00 2014-05-09T17:32:44+10:00
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
Increase generated password length to 12 symbols. http://hg.code.sf.net:8000/p/roundup/code/#changeset-efdce3d32698fdd2d0f40df2d5116eaaf619c1f1 anatoly techtonik techtonik@gmail.com 2013-02-18T00:42:08+03:00 2013-02-18T00:42:08+03:00
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
windows: Fix failing password tests due to missing crypt module http://hg.code.sf.net:8000/p/roundup/code/#changeset-2f66d44616ad1f7416b65549f10b173307396e4f anatoly techtonik techtonik@gmail.com 2012-11-28T02:56:33+03:00 2012-11-28T02:56:33+03:00
changeset 2f66d44616ad
branch
bookmark
tag
user anatoly techtonik <techtonik@gmail.com>
description windows: Fix failing password tests due to missing crypt module
files
Remove keyword expansions from CVS. All regression tests passed afterwards. http://hg.code.sf.net:8000/p/roundup/code/#changeset-6e3e4f24c75376f61ae0bf0e9ee334567585c38e Eric S. Raymond esr@thyrsus.com 2011-11-16T09:51:38-05:00 2011-11-16T09:51:38-05:00
changeset 6e3e4f24c753
branch
bookmark
tag
user Eric S. Raymond <esr@thyrsus.com>
description Remove keyword expansions from CVS. All regression tests passed afterwards.
files
python2.4 compatibility fix http://hg.code.sf.net:8000/p/roundup/code/#changeset-357c6079c73b1bb0b28502ead5942f732c80dba1 Ralf Schlatterbeck schlatterbeck@users.sourceforge.net 2011-04-16T18:38:18+00:00 2011-04-16T18:38:18+00:00
changeset 357c6079c73b
branch
bookmark
tag
user Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net>
description python2.4 compatibility fix
files
Add new config-option 'password_pbkdf2_default_rounds'... http://hg.code.sf.net:8000/p/roundup/code/#changeset-693c75d56ebef568acf0c3ffbf7e83342be2d3cd Ralf Schlatterbeck schlatterbeck@users.sourceforge.net 2011-04-15T08:09:59+00:00 2011-04-15T08:09:59+00:00
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
use idea from Eli Collins to use a list of deprecated password encoding schemes http://hg.code.sf.net:8000/p/roundup/code/#changeset-95aace124a8e4bb8efe96716760a3f7fb211dbb2 Ralf Schlatterbeck schlatterbeck@users.sourceforge.net 2011-04-14T18:27:51+00:00 2011-04-14T18:27:51+00:00
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
Add new config-option 'migrate_passwords' in section 'web'... http://hg.code.sf.net:8000/p/roundup/code/#changeset-52e13bf0bb402e92cc1cc72bbad6306fe1a9f789 Ralf Schlatterbeck schlatterbeck@users.sourceforge.net 2011-04-14T18:10:58+00:00 2011-04-14T18:10:58+00:00
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
Second patch from issue2550688 -- with some changes: http://hg.code.sf.net:8000/p/roundup/code/#changeset-22bc0426e348d9cb72efb4643290983c4aedd324 Ralf Schlatterbeck schlatterbeck@users.sourceforge.net 2011-04-14T15:42:41+00:00 2011-04-14T15:42:41+00:00
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
Fix first part of Password handling security issue2550688 http://hg.code.sf.net:8000/p/roundup/code/#changeset-1613754d26466c96b3fbf6a74ae5db2f944df1c9 Ralf Schlatterbeck schlatterbeck@users.sourceforge.net 2011-04-14T12:24:59+00:00 2011-04-14T12:24:59+00:00
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
Add compatibility package to allow us to deal with Python versions 2.3..2.6. http://hg.code.sf.net:8000/p/roundup/code/#changeset-eddb82d0964c180bc8cc6199e2db8e7eb74a26cc Richard Jones richard@users.sourceforge.net 2009-03-12T02:52:56+00:00 2009-03-12T02:52:56+00:00
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
keep plaintext password in Password object property (rfe [SF#1379447]) http://hg.code.sf.net:8000/p/roundup/code/#changeset-822a2719b81b85542389e3e16cff534567191c6e Alexander Smishlajev a1s@users.sourceforge.net 2005-12-25T15:38:40+00:00 2005-12-25T15:38:40+00:00
changeset 822a2719b81b
branch
bookmark
tag
user Alexander Smishlajev <a1s@users.sourceforge.net>
description keep plaintext password in Password object property (rfe [SF#1379447])
files
encodePassword: don't trim the salt string... http://hg.code.sf.net:8000/p/roundup/code/#changeset-1f860b50fa5fd7b5d2894920c2f32fd801b068bf Alexander Smishlajev a1s@users.sourceforge.net 2005-12-03T11:35:54+00:00 2005-12-03T11:35:54+00:00
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
added MD5 scheme for password hiding http://hg.code.sf.net:8000/p/roundup/code/#changeset-c9e52addda4289efe152fb311ccdb92d41f2d6db Richard Jones richard@users.sourceforge.net 2004-05-10T22:32:17+00:00 2004-05-10T22:32:17+00:00
changeset c9e52addda42
branch
bookmark
tag
user Richard Jones <richard@users.sourceforge.net>
description added MD5 scheme for password hiding
files
Implemented proper datatypes in mysql and postgresql backends... http://hg.code.sf.net:8000/p/roundup/code/#changeset-18addf2a85960e1236aa6b48bc24d3d6d2a20084 Richard Jones richard@users.sourceforge.net 2004-03-22T07:45:40+00:00 2004-03-22T07:45:40+00:00
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
documentation cleanup http://hg.code.sf.net:8000/p/roundup/code/#changeset-fc52d57c6c3e1527f340677f484744a40f645ad4 Richard Jones richard@users.sourceforge.net 2004-02-11T23:55:10+00:00 2004-02-11T23:55:10+00:00
changeset fc52d57c6c3e
branch
bookmark
tag
user Richard Jones <richard@users.sourceforge.net>
description documentation cleanup
files
Centralised conversion of user-input data to hyperdb values http://hg.code.sf.net:8000/p/roundup/code/#changeset-dc43e339e607a66e8e83839f3878f37f07233930 Richard Jones richard@users.sourceforge.net 2003-11-11T00:35:14+00:00 2003-11-11T00:35:14+00:00
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
[maint-0.5] email registered users shouldn't be able to log in [SF#714673] http://hg.code.sf.net:8000/p/roundup/code/#changeset-6d1af2e441f41f924c655da1fc5cf7566ff2a43a Richard Jones richard@users.sourceforge.net 2003-04-24T07:51:52+00:00 2003-04-24T07:51:52+00:00
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
set new email rego user password to random string http://hg.code.sf.net:8000/p/roundup/code/#changeset-caae7d8934dcf6c7a16feace83cd8cf09ae359ac Richard Jones richard@users.sourceforge.net 2003-04-10T05:12:42+00:00 2003-04-10T05:12:42+00:00
changeset caae7d8934dc
branch
bookmark
tag
user Richard Jones <richard@users.sourceforge.net>
description set new email rego user password to random string
files