moved honeypot check to www_processSubscription
This commit is contained in:
parent
5a2e9e9e4f
commit
abaa483aa3
1 changed files with 10 additions and 4 deletions
|
|
@ -395,13 +395,13 @@ sub sendSubscriptionConfirmation {
|
|||
my $action = shift || 'subscribe';
|
||||
my $session = $self->session;
|
||||
my $i18n = WebGUI::International->new( $session, 'AssetAspect_Subscriber' );
|
||||
|
||||
=pod
|
||||
my $honeypot = $session->form->honeypot( 'hp' );
|
||||
if ( $self->get('useHoneypot') && $honeypot ) {
|
||||
$session->log->warn( "Honeypot triggered: $honeypot" );
|
||||
return;
|
||||
}
|
||||
|
||||
=cut
|
||||
my $var = $self->getEmailVars( $user );
|
||||
my $url = $session->url->getSiteURL . $self->getUrl( "func=confirmMutation;code=$code" );
|
||||
|
||||
|
|
@ -440,13 +440,13 @@ sub sendNoMutationEmail {
|
|||
my $action = shift || 'subscribe';
|
||||
my $session = $self->session;
|
||||
my $i18n = WebGUI::International->new( $session, 'AssetAspect_Subscriber' );
|
||||
|
||||
=pod
|
||||
my $honeypot = $session->form->honeypot( 'hp' );
|
||||
if ( $self->get('useHoneypot') && $honeypot ) {
|
||||
$session->log->warn( "Honeypot triggered: $honeypot" );
|
||||
return;
|
||||
}
|
||||
|
||||
=cut
|
||||
my $var = $self->getEmailVars( $user );
|
||||
$var->{ actionIsSubscribe } = $action eq 'subscribe';
|
||||
|
||||
|
|
@ -682,6 +682,12 @@ sub www_processSubscription {
|
|||
my $action = $form->get( 'action' );
|
||||
return unless $action eq 'subscribe' || $action eq 'unsubscribe';
|
||||
|
||||
my $honeypot = $session->form->honeypot( 'hp' );
|
||||
if ( $self->get('useHoneypot') && $honeypot ) {
|
||||
$session->log->warn( "Honeypot triggered: $honeypot" );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( $session->user->isRegistered ) {
|
||||
if ( $action eq 'subscribe' && $self->canSubscribe ) {
|
||||
$self->subscribe;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue