Closed Bug 1166337 Opened 9 years ago Closed 9 years ago

Ignore *@users.noreply.github.com returned from GitHub

Categories

(bugzilla.mozilla.org :: Extensions, defect, P2)

Production
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: dylan, Assigned: dylan)

Details

Attachments

(1 file, 1 obsolete file)

We already ignore unverified email addresses, so we should ignore *@users.noreply.github.com as well.

If GitHub returns ONLY a noreply account, we will fail with a specific error explaining to the user that this is not acceptable.

(Anonymity is fine, but the noreply aspect is what is not acceptable.)
Attached patch 1166337_1.patch (obsolete) — Splinter Review
Attachment #8611603 - Flags: review?(glob)
Comment on attachment 8611603 [details] [diff] [review]
1166337_1.patch

Actually, dkl makes more sense as he's seen this code. my bad.
Attachment #8611603 - Flags: review?(glob) → review?(dkl)
Comment on attachment 8611603 [details] [diff] [review]
1166337_1.patch

Review of attachment 8611603 [details] [diff] [review]:
-----------------------------------------------------------------

::: extensions/GitHubAuth/lib/Login.pm
@@ +145,5 @@
> +        if (@verified_emails) {
> +            return { failure => AUTH_ERROR, user_error => 'github_no_reply_email' };
> +        }
> +        else {
> +            return { failure => AUTH_ERROR, user_error => 'github_no_emails' };

See comment about using single 'github_no_emails' error for user-error-errors.html.tmpl.

::: extensions/GitHubAuth/template/en/default/hook/global/user-error-errors.html.tmpl
@@ +11,5 @@
>    has no verified email addresses or [% terms.Bugzilla %] is not authorized to see them.
>  
> +[% ELSIF error == "github_no_reply_email" %]
> +  Your GitHub account cannot be used because [% terms.Bugzilla %] cannot see any
> +  email addresses, except for [% noreply_email FILTER html %]. GitHub noreply

noreply_email not set to any value in the code. Instead of having a separate error, I would
just combine with 'github_no_emails' and mention in the error text that noreply emails are not acceptable.
Attachment #8611603 - Flags: review?(dkl) → review-
Attached patch 1166337_2.patchSplinter Review
With simplified error handling per last review.
Attachment #8611603 - Attachment is obsolete: true
Attachment #8621397 - Flags: review?(dkl)
Comment on attachment 8621397 [details] [diff] [review]
1166337_2.patch

Review of attachment 8621397 [details] [diff] [review]:
-----------------------------------------------------------------

r=dkl

::: extensions/GitHubAuth/template/en/default/hook/global/user-error-errors.html.tmpl
@@ +7,5 @@
>    #%]
>  
>  [% IF error == "github_no_emails" %]
> +  Your GitHub account cannot be used because [% terms.Bugzilla %] cannot see any useable email addresses. Your GitHub account
> +  may have no verified email addresses, [% terms.Bugzilla %] is not authorized to see them, or you have reply-able email addresses.

s/reply-able/non-reply-able/
Attachment #8621397 - Flags: review?(dkl) → review+
To ssh://gitolite3@git.mozilla.org/webtools/bmo/bugzilla.git
   cadc7a6..061328f  master -> master
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Component: Extensions: GitHubAuth → Extensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: