summaryrefslogtreecommitdiffstats
path: root/extensions/GitHubAuth
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@mozilla.com>2015-06-15 15:11:12 +0200
committerDylan William Hardison <dylan@hardison.net>2015-06-15 15:11:12 +0200
commit061328fe4778f8b633e5441828c2962672603922 (patch)
tree79ea443dfb0eb9134547e252c4e0e2a31b5ddbb9 /extensions/GitHubAuth
parentcadc7a6ee5c77b35bd8b48b058e109777a6e8fd0 (diff)
downloadbugzilla-061328fe4778f8b633e5441828c2962672603922.tar.gz
bugzilla-061328fe4778f8b633e5441828c2962672603922.tar.xz
Bug 1166337: Ignore *@users.noreply.github.com returned from GitHub
Diffstat (limited to 'extensions/GitHubAuth')
-rw-r--r--extensions/GitHubAuth/lib/Login.pm3
-rw-r--r--extensions/GitHubAuth/template/en/default/hook/global/user-error-errors.html.tmpl5
2 files changed, 5 insertions, 3 deletions
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.