Explorar el Código

uri_escape login and password for bugzilla

merge-requests/19/head
Jonathan Druart hace 3 años
padre
commit
b95ca13d51
  1. 3
      lib/Koha/BZ.pm

3
lib/Koha/BZ.pm

@ -5,6 +5,7 @@ use Modern::Perl;
use JSON;
use YAML;
use REST::Client;
use URI::Escape qw( uri_escape );
has client => (is => 'rw', isa => 'REST::Client');
@ -76,7 +77,7 @@ sub BUILD {
$self->client( REST::Client->new() );
if ( $self->login ) {
my $response = $self->get('login?login=' . $self->login . "&password=" . $self->password);
my $response = $self->get('login?login=' . uri_escape($self->login) . "&password=" . uri_escape($self->password));
if ( $response->{error} ) {
say "Wrong login/password to BZ";
exit 1;

Cargando…
Cancelar
Guardar