Re: [HACKERS] Removal of plaintext password type references
От | Heikki Linnakangas |
---|---|
Тема | Re: [HACKERS] Removal of plaintext password type references |
Дата | |
Msg-id | 4c271e82-f809-6228-2313-c897a90ebcf9@iki.fi обсуждение исходный текст |
Ответ на | Re: [HACKERS] Removal of plaintext password type references (Michael Paquier <michael.paquier@gmail.com>) |
Ответы |
Re: [HACKERS] Removal of plaintext password type references
Re: [HACKERS] Removal of plaintext password type references |
Список | pgsql-hackers |
On 05/10/2017 08:01 AM, Michael Paquier wrote: > On Wed, May 10, 2017 at 10:51 AM, Vaishnavi Prabakaran > <vaishnaviprabakaran@gmail.com> wrote: >> Following recent removal of support to store password in plain text, >> modified the code to >> >> 1. Remove "PASSWORD_TYPE_PLAINTEXT" macro >> 2. Instead of using "get_password_type" to retrieve the encryption method >> AND to check if the password is already encrypted or not, modified the code >> to >> a. Use "get_password_encryption_type" function to retrieve encryption >> method. >> b. Use "isPasswordEncrypted" function to check if the password is already >> encrypted or not. >> >> These changes are mainly to increase code readability and does not change >> underlying functionality. > > Actually, this patch reduces readability. Yeah, I don't think this is an improvement. Vaishnavi, did you find the current code difficult? Perhaps some extra comments somewhere would help? Also note that changing the signature check_password_hook_type would break any external modules that use the hook. Removing PASSWORD_TYPE_PLAINTEXT will do that too, because any password hook function would use that constant (see e.g. contrib/passwordcheck). If we were to change the signature, I'd actually like to simplify it by removing the password_type parameter altogether. The hook function can call get_password_type() on the password itself to get the same information. But it's not worth changing the API and breaking external modules for that. - Heikki
В списке pgsql-hackers по дате отправления: