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.
Current Behavior:
The
makeLoginRequest()function currently checks the result ofpreg_matchusing=== falsefor finding the challenge string needed for password hashing. However, preg_match returns1for a match,0for no match, andfalseon failure. Checking only againstfalsedoes not properly handle cases where the pattern does not match (returns 0).Expected Behavior:
The function should check if
preg_match !== 1to 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.