Deploy: 2026-05-23 18:23:34

This commit is contained in:
Hamza-Ayed
2026-05-23 18:23:34 +03:00
parent ffe04146f5
commit 354e60a99e
2 changed files with 4 additions and 4 deletions

View File

@@ -57,8 +57,8 @@ if (!preg_match('/^\+[1-9]\d{6,14}$/', $phone)) {
exit;
}
// Validate OTP format (4 digits)
if (!preg_match('/^\d{4}$/', $otp)) {
// Validate OTP format (3 or 4 digits)
if (!preg_match('/^\d{3,4}$/', $otp)) {
http_response_code(400);
echo json_encode(['success' => false, 'message' => 'invalid_otp_format']);
RequestLogger::log('verify-otp', 'POST', $input, 400, 'invalid_otp_format');