Close the remaining ciphertext joins and a SQL injection in email verification
- Customer-service notes joined to the account by comparing encrypted phone columns. Both notes tables now carry phone_key, written when a note is saved, and the three joins match on it. - The email_verifications join was comparing a plaintext column against an encrypted one, so it never matched and `verified` was always NULL in both passenger and driver sign-in. It is now resolved in PHP against the decrypted address, which fixes a pre-existing bug rather than only preparing for GCM. - auth/sendVerifyEmail.php built all three of its statements by interpolating the request values into SQL. Any caller could inject through the email or token field. Now parameterised. - serviceapp/register.php duplicate detection consults the users indexes and writes them with the row. Sweep confirms no join or lookup compares two encrypted columns any more. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
35a66935aa
commit
2135edcf43
@@ -24,7 +24,7 @@ FROM
|
||||
LEFT JOIN
|
||||
driver d ON pv.phone_number = d.phone_key
|
||||
LEFT JOIN
|
||||
notesForDriverService n ON pv.phone_number = n.phone
|
||||
notesForDriverService n ON pv.phone_number = n.phone_key
|
||||
WHERE
|
||||
d.phone IS NULL
|
||||
AND (n.note != 'delete' OR n.note IS NULL)
|
||||
|
||||
Reference in New Issue
Block a user