From 061328fe4778f8b633e5441828c2962672603922 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Mon, 15 Jun 2015 09:11:12 -0400 Subject: Bug 1166337: Ignore *@users.noreply.github.com returned from GitHub --- extensions/GitHubAuth/lib/Login.pm | 3 ++- .../template/en/default/hook/global/user-error-errors.html.tmpl | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'extensions/GitHubAuth') diff --git a/extensions/GitHubAuth/lib/Login.pm b/extensions/GitHubAuth/lib/Login.pm index 5f1ad4a77..cb0c68075 100644 --- a/extensions/GitHubAuth/lib/Login.pm +++ b/extensions/GitHubAuth/lib/Login.pm @@ -87,7 +87,8 @@ sub _get_login_info_from_github { die $e; } - my @emails = map { $_->{email} } grep { $_->{verified} } @$emails; + my @emails = map { $_->{email} } + grep { $_->{verified} && $_->{email} !~ /\@users\.noreply\.github\.com$/ } @$emails; my $choose_email = sub { my ($email) = @_; diff --git a/extensions/GitHubAuth/template/en/default/hook/global/user-error-errors.html.tmpl b/extensions/GitHubAuth/template/en/default/hook/global/user-error-errors.html.tmpl index 61a08367d..9a2d1206c 100644 --- a/extensions/GitHubAuth/template/en/default/hook/global/user-error-errors.html.tmpl +++ b/extensions/GitHubAuth/template/en/default/hook/global/user-error-errors.html.tmpl @@ -7,8 +7,9 @@ #%] [% IF error == "github_no_emails" %] - Your GitHub account cannot be used because [% terms.Bugzilla %] cannot see any email addresses. Either your GitHub account - has no verified email addresses or [% terms.Bugzilla %] is not authorized to see them. + 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 a non-reply-able email addresses. + GitHub's noreply email addresses are not acceptable for [% terms.Bugzilla %] accounts because they cannot recieve email. [% ELSIF error == "github_invalid_email" %] Your GitHub account email '[% email FILTER html %]' is not valid. -- cgit v1.2.3-24-g4f1b