Skip to content

Commit

Permalink
added case insensitivity to the uploaduserkey
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Luticus authored Jun 16, 2020
1 parent d51889c commit db0e434
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Controller/KeyController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit db0e434

Please sign in to comment.