Ticket #1922 (closed enhancement: fixed)
Enable to customize passwd hash features
Reported by: | bruno | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 2.10 |
Component: | module:auth | Version: | 2.6.1 |
Severity: | normal | Keywords: | |
Cc: |
Description
Currently auth relies on sha1 as hash algorithm, whereas clearbricks enables to select stronger algorithms such as sha256.
The hash method choice should be available to the admin through inc/config.php.
Change History
comment:2 Changed 8 years ago by franck
Par contre ça va foutre le souk dès qu'on va changer cette constante dans le inc/config.php vu que les mots de passe, y compris celui du super-admin, sera chiffré avec l'ancienne méthode dans la base.
comment:3 Changed 8 years ago by franck <carnet.franck.paul@…>
(In [f4f355349c61]) [clearbricks] : Allow other crypt alogorithms (rather than sha1 or md5), addresses #1922
comment:4 Changed 8 years ago by franck
Et pour mémo, la taille de stockage du mot de passe chiffré devient trop petite (actuellement à 40 caractères) avec certains algos :
- algorithme → longueur résultante
- md2 → 32
- md4 → 32
- md5 → 32
- sha1 → 40
- sha224 → 56
- sha256 → 64
- sha384 → 96
- sha512 → 128
- ripemd128 → 32
- ripemd160 → 40
- ripemd256 → 64
- ripemd320 → 80
- whirlpool → 128
- tiger128,3 → 32
- tiger160,3 → 40
- tiger192,3 → 48
- tiger128,4 → 32
- tiger160,4 → 40
- tiger192,4 → 48
- snefru → 64
- snefru256 → 64
- gost → 64
- gost-crypto → 64
- adler32 → 8
- crc32 → 8
- crc32b → 8
- fnv132 → 8
- fnv1a32 → 8
- fnv164 → 16
- fnv1a64 → 16
- joaat → 8
- haval128,3 → 32
- haval160,3 → 40
- haval192,3 → 48
- haval224,3 → 56
- haval256,3 → 64
- haval128,4 → 32
- haval160,4 → 40
- haval192,4 → 48
- haval224,4 → 56
- haval256,4 → 64
- haval128,5 → 32
- haval160,5 → 40
- haval192,5 → 48
- haval224,5 → 56
- haval256,5 → 64
comment:5 Changed 8 years ago by franck
Donc soit on passe le champ à 255 histoire d'être tranquille un moment, soit on se limite aux 40 premiers (ou derniers) caractères sans toucher à la structure de la base.
Quoi qu'il en soit le changement d'algo obligera les utilisateurs des installations existantes à utiliser la procédure de password recovery pour pouvoir ensuite se connecter et il faudra (éventuellement) prévoir cette option (type d'algo) dans le wizard d'installation.
Ou prévoir un plugin ou une fonction de conversion.
Bref rien de trivial.
comment:7 Changed 8 years ago by franck <carnet.franck.paul@…>
- Status changed from new to closed
- Resolution set to fixed
(In [bf7f869cfed9]) Allow different cryptographic algorithm for user password, choosen algo must provide result longer or equal than 40 characters (as default sha1), closes #1922
The constant DC_CRYPT_ALGO should be defined in config.php, and users will have to use recovery password procedure to set a new one according to the choosen algorithm.
Pour l'instant CB ne permet que sha1 ou md5, rien d'autre.