Browse Source

uri_escape login and password for bugzilla

merge-requests/19/head
Jonathan Druart 1 month ago
parent
commit
b95ca13d51
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      lib/Koha/BZ.pm

+ 2
- 1
lib/Koha/BZ.pm View File

@@ -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;


Loading…
Cancel
Save