diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/SSL.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/SSL.pm index cf90f1600..1d54df29b 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/SSL.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Auth/SSL.pm @@ -26,13 +26,6 @@ sub init { # @return Lemonldap::NG::Portal constant sub extractFormInfo { my ( $self, $req ) = @_; - - # If this is the ajax query, allow response to contain HTML code - # to update the portal error message - if ( $req->wantJSON ) { - $req->wantErrorRender(1); - } - my $field = $self->conf->{SSLVar}; if ( $req->env->{SSL_CLIENT_I_DN} ) { $self->logger->debug( @@ -57,16 +50,6 @@ sub extractFormInfo { return PE_BADCERTIFICATE; } elsif ( $self->conf->{sslByAjax} and not $req->param('nossl') ) { - - # If this is the AJAX query - if ( $req->wantJSON ) { - return PE_CERTIFICATEREQUIRED; - } - - $self->logger->debug( 'Append ' . $self->{Name} . ' init/script' ); - $req->data->{customScript} .= $self->{AjaxInitScript}; - $self->logger->debug( - "Send init/script -> " . $req->data->{customScript} ); $req->data->{waitingMessage} = 1; return PE_FIRSTACCESS; } @@ -75,7 +58,6 @@ sub extractFormInfo { $self->logger->debug( 'Append ' . $self->{Name} . ' init/script' ); $self->logger->debug( "Send init/script -> " . $req->data->{customScript} ); - return PE_BADCERTIFICATE; } $self->userLogger->warn('No certificate found'); return PE_CERTIFICATEREQUIRED; @@ -102,4 +84,4 @@ sub authLogout { PE_OK; } -1; +1; \ No newline at end of file