diff --git a/lib/pause_2017/PAUSE/Web/Config.pm b/lib/pause_2017/PAUSE/Web/Config.pm
index ce85d48fe..47ea373c4 100644
--- a/lib/pause_2017/PAUSE/Web/Config.pm
+++ b/lib/pause_2017/PAUSE/Web/Config.pm
@@ -451,7 +451,6 @@ our %Actions = (
pause99_edit_cred_email => {form_type => "text_field"},
pause99_edit_cred_secretemail => {form_type => "text_field"},
pause99_edit_cred_homepage => {form_type => "text_field"},
- pause99_edit_cred_cpan_mail_alias => {form_type => "radio_button"},
pause99_edit_cred_ustatus => {form_type => "check_box"}, # to delete
pause99_edit_cred_sub => {form_type => "submit_button"},
},
diff --git a/lib/pause_2017/PAUSE/Web/Controller/Admin.pm b/lib/pause_2017/PAUSE/Web/Controller/Admin.pm
index 5791fdafa..eaf825a75 100644
--- a/lib/pause_2017/PAUSE/Web/Controller/Admin.pm
+++ b/lib/pause_2017/PAUSE/Web/Controller/Admin.pm
@@ -14,35 +14,22 @@ sub email_for_admin {
my $dbm = $mgr->connect;
my $sth1 = $dbm->prepare(qq{SELECT userid, email
FROM users
- WHERE isa_list = ''
- AND (
- cpan_mail_alias='publ'
- OR
- cpan_mail_alias='secr'
- )});
+ WHERE isa_list = ''});
$sth1->execute;
while (my($id,$mail) = $sth1->fetchrow_array) {
- $ALL{$id} = $mail; # we store public email even for those who want
- # secret, because we never know if we will find a
- # secret one
+ $ALL{$id} = $mail; # store public email as baseline
}
$sth1->finish;
- my $sth2 = $dbm->prepare(qq{SELECT userid
- FROM users
- WHERE cpan_mail_alias='secr'
- AND isa_list = ''});
+
+ my $sth2 = $dba->prepare(qq{SELECT user, secretemail
+ FROM usertable});
$sth2->execute;
- my $sth3 = $dba->prepare(qq{SELECT secretemail
- FROM usertable
- WHERE user=?});
- while (my($id) = $sth2->fetchrow_array) {
- $sth3->execute($id);
- next unless $sth3->rows;
- my($mail) = $sth3->fetchrow_array or next;
- $ALL{$id} = $mail;
+ while (my($id,$mail) = $sth2->fetchrow_array) {
+ if (exists $ALL{$id} && defined $mail && $mail ne '') {
+ $ALL{$id} = $mail; # override with secret email if available
+ }
}
$sth2->finish;
- $sth3->finish;
};
my $output_format = $req->param("OF");
if ($output_format){
diff --git a/lib/pause_2017/PAUSE/Web/Controller/User/Cred.pm b/lib/pause_2017/PAUSE/Web/Controller/User/Cred.pm
index 680ed8c4c..3a4f6b46d 100644
--- a/lib/pause_2017/PAUSE/Web/Controller/User/Cred.pm
+++ b/lib/pause_2017/PAUSE/Web/Controller/User/Cred.pm
@@ -14,9 +14,9 @@ sub edit {
$u = $c->active_user_record;
# @allmeta *must* be the union of meta and secmeta
- my @meta = qw( fullname asciiname email homepage cpan_mail_alias ustatus);
+ my @meta = qw( fullname asciiname email homepage ustatus);
my @secmeta = qw(secretemail);
- my @allmeta = qw( fullname asciiname email secretemail homepage cpan_mail_alias ustatus);
+ my @allmeta = qw( fullname asciiname email secretemail homepage ustatus);
my $cpan_alias = lc($u->{userid}) . '@cpan.org';
@@ -26,18 +26,9 @@ sub edit {
if (uc $req->method eq 'POST' and $req->param("pause99_edit_cred_sub")) {
my $wantemail = $req->param("pause99_edit_cred_email");
my $wantsecretemail = $req->param("pause99_edit_cred_secretemail");
- my $wantalias = $req->param("pause99_edit_cred_cpan_mail_alias");
my $addr_spec = $Email::Address::addr_spec;
if ($wantemail=~/^\s*$/ && $wantsecretemail=~/^\s*$/) {
$pause->{error}{no_email} = 1;
- } elsif ($wantalias eq "publ" && $wantemail=~/^\s*$/) {
- $pause->{error}{no_public_email} = 1;
- } elsif ($wantalias eq "publ" && $wantemail=~/\Q$cpan_alias\E/i) {
- $pause->{error}{public_is_cpan_alias} = 1;
- } elsif ($wantalias eq "secr" && $wantsecretemail=~/^\s*$/) {
- $pause->{error}{no_secret_email} = 1;
- } elsif ($wantalias eq "secr" && $wantsecretemail=~/\Q$cpan_alias\E/i) {
- $pause->{error}{secret_is_cpan_alias} = 1;
} elsif (defined $wantsecretemail && $wantsecretemail!~/^\s*$/ && $wantsecretemail!~/^\s*$addr_spec\s*$/) {
$pause->{error}{invalid_secret} = 1;
} elsif (defined $wantemail && $wantemail!~/^\s*$/ && $wantemail!~/^\s*$addr_spec\s*$/ && $wantemail ne 'CENSORED') {
diff --git a/lib/pause_2017/templates/admin/email_for_admin.html.ep b/lib/pause_2017/templates/admin/email_for_admin.html.ep
index d1dad4034..8b6abc842 100644
--- a/lib/pause_2017/templates/admin/email_for_admin.html.ep
+++ b/lib/pause_2017/templates/admin/email_for_admin.html.ep
@@ -9,7 +9,7 @@
id
- id@cpan.org gets forwarded to
+ Contact Email
<%= text_field "pause99_request_id_email", size => 32 %>
+Note that contact information will be shared with the CPAN security team (security.cpan.org).
-cpan.org has a mail
-address for you and it's your choice if you want it to point to your
-public email address or to your secret one. Please allow a few hours
-for any change you make to this setting for propagation. BTW, let us
-reassure you that cpan.org gets the data through a secure
-channel.
Note: you can disable redirect by clicking
-neither nor or by using an invalid email address in the
-according field above, but this will prevent you from recieving
-emails from services like rt.cpan.org.
+Contact information will be shared with the CPAN security team (security.cpan.org).
+
+cpan.org email forwarding has been shut down. +See this blog post for more information.
-<%= radio_button "pause99_edit_cred_cpan_mail_alias" => "publ" %> -my public email address