Skip to content

Hash::check not applying options before verifying Algorithm #55759

Open
@GeNyaa

Description

@GeNyaa

Laravel Version

12.x, 11.x

PHP Version

8.2, 8.1

Database Driver & Version

No response

Description

When using;

Hash::check(
    'password',
    'hash',
    [
        'verify' => false,
    ]
);

it'll still verify the algorithm before running the rest of the function and will throw a bcrypt error, if the incorrect value is used.

Steps To Reproduce

make sure bcrypt verify is set to true in config.

Hash::check(
    'password',
    '$2a$12$JU/xbox8TdX8Yp7deAOAnu9KWeGtreepOspbfa4t9x7yaxICVfzuq',
    [
        'verify' => false,
    ]
);

results in an error thrown instead of a true or false.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions