Account: do not disclose denylist filename on open error
This commit is contained in:
parent
ed0054fa50
commit
ac3c70597d
1 changed files with 13 additions and 9 deletions
|
@ -88,8 +88,7 @@ sub register {
|
||||||
if ( my $registration_denylist
|
if ( my $registration_denylist
|
||||||
= $self->app->config->{registration}->{denylist} )
|
= $self->app->config->{registration}->{denylist} )
|
||||||
{
|
{
|
||||||
open( my $fh, "<", $registration_denylist )
|
if ( open( my $fh, "<", $registration_denylist ) ) {
|
||||||
or die("cannot open($registration_denylist)");
|
|
||||||
while ( my $line = <$fh> ) {
|
while ( my $line = <$fh> ) {
|
||||||
chomp $line;
|
chomp $line;
|
||||||
if ( $ip eq $line ) {
|
if ( $ip eq $line ) {
|
||||||
|
@ -100,6 +99,11 @@ sub register {
|
||||||
}
|
}
|
||||||
close($fh);
|
close($fh);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$self->log->error("Cannot open($registration_denylist): $!");
|
||||||
|
die("Cannot verify registration: $!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( my $error = $self->users->is_name_invalid( name => $user ) ) {
|
if ( my $error = $self->users->is_name_invalid( name => $user ) ) {
|
||||||
$self->render( 'register', invalid => $error );
|
$self->render( 'register', invalid => $error );
|
||||||
|
|
Loading…
Reference in a new issue