Update: 2026-05-06 03:34:30
This commit is contained in:
@@ -22,6 +22,7 @@ if ((!$email && !$id) || !$phone) {
|
|||||||
$db = Database::getInstance();
|
$db = Database::getInstance();
|
||||||
|
|
||||||
// 1. Sanitize phone
|
// 1. Sanitize phone
|
||||||
|
try {
|
||||||
$cleanPhone = preg_replace('/[^0-9+]/', '', $phone);
|
$cleanPhone = preg_replace('/[^0-9+]/', '', $phone);
|
||||||
$phoneHash = hash('sha256', $cleanPhone);
|
$phoneHash = hash('sha256', $cleanPhone);
|
||||||
$encryptedPhone = Encryption::encrypt($cleanPhone);
|
$encryptedPhone = Encryption::encrypt($cleanPhone);
|
||||||
@@ -43,5 +44,9 @@ if ($stmt->rowCount() > 0) {
|
|||||||
echo " Encrypted: $encryptedPhone\n";
|
echo " Encrypted: $encryptedPhone\n";
|
||||||
echo " Hash: $phoneHash\n";
|
echo " Hash: $phoneHash\n";
|
||||||
} else {
|
} else {
|
||||||
echo "❌ Failed. User with email $email not found or no changes made.\n";
|
echo "❌ Failed. User with $identifier not found or no changes made.\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo "❌ Error: " . $e->getMessage() . "\n";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user