4 ms·
``` ).WHERE( AND( table.SSHKeys.Email.EQ(String(to_email)), table.SSHKeys.Fingerprint.EQ(String(fingerprint)), ), ) ``` If not using a `citext` col
by wutwutwat 2y ago
```
).WHERE(
AND(
table.SSHKeys.Email.EQ(String(to_email)),
table.SSHKeys.Fingerprint.EQ(String(fingerprint)),
),
)
```
If not using a `citext` column then you're going to want to normalize (ie downcase/tolower) everywhere you're doing arbitrary string comparisons, or you're going to get incorrect counts.
Also I don't see any null or "" checking taking place before querying...
I'm not going to trust that your service can give me any reasonable confidence about the identity of the ssh key or the email it's attached to.
That aside, I'm not understanding what the goal here is. I've never once needed my ssh key tied to my email address, but if I did, it's included in the public key already...
- messh 2y agothere is email validation, and the public key is handled between the ssh client and server. If there is no valid public key this code would not even run. The fingerprint is prepared from this valid public key. Regarding having the email in the ssh pub key: maybe it is there, but it is no validated. Anyone could write anything there