Skip to content

makeLoginRequest() challenge string match check is incorrect #6

@blancks

Description

@blancks

Current Behavior:
The makeLoginRequest() function currently checks the result of preg_match using === false for finding the challenge string needed for password hashing. However, preg_match returns 1 for a match, 0 for no match, and false on failure. Checking only against false does not properly handle cases where the pattern does not match (returns 0).

Expected Behavior:
The function should check if preg_match !== 1 to ensure that only a successful match passes, and both no match (0) and errors (false) are properly handled.

Additional Context:
This change will improve the robustness of the challenge string detection and prevent potential logic issues due to incorrect preg_match result handling.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions