From db0e434d40ade4ee699f19bab5b8c668a50982c8 Mon Sep 17 00:00:00 2001 From: Joe Date: Tue, 16 Jun 2020 12:42:57 -0400 Subject: [PATCH] added case insensitivity to the uploaduserkey Added case insensitivity to the uploaduserkey function to allow gpgkey and valid email to ignore case. This will allow it to import keys for email addresses that have varying capitalization. This should work fine as email addresses are not case sensitive, and other email clients tend to handle this just fine. --- lib/Controller/KeyController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Controller/KeyController.php b/lib/Controller/KeyController.php index 038f558..4407c2f 100644 --- a/lib/Controller/KeyController.php +++ b/lib/Controller/KeyController.php @@ -66,7 +66,7 @@ public function uploadUserKey($keydata) { $keyinfo = $this->gpg->keyinfo($fingerprint, $this->userId); $key_for_email = false; foreach ($keyinfo[0]['uids'] as $uid) { - if ($uid['email'] === $email) { + if (strtolower($uid['email']) === strtolower($email)) { $key_for_email = true; break; }