Skip to content

PASSWORD_ARGON2I constant undefined in 7.2-alpine #659

@forevermatt

Description

@forevermatt

While testing password_hash() in PHP 7.2, I noticed that the 7.2-alpine Docker image seems to lack the PASSWORD_ARGON2I constant.

Example of error:

$ docker run --rm -it library/php:7.2-alpine ash
/ # php -r "echo PASSWORD_ARGON2I . PHP_EOL;"

Warning: Use of undefined constant PASSWORD_ARGON2I - assumed 'PASSWORD_ARGON2I' (this will throw an Error in a future version of PHP) in Command line code on line 1
PASSWORD_ARGON2I

Example of expected behavior (using the 7.2 image):

$ docker run --rm -it library/php:7.2 bash
root@068d1b669538:/# php -r "echo PASSWORD_ARGON2I . PHP_EOL;"
2

I don't know if it's related to the LibreSSL configuration discussion here, but this seemed worth mentioning since the new password hashing stuff is one of the great benefits of PHP 7.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions