View | Details | Raw Unified | Return to bug 35724
Collapse All | Expand All

(-)a/Koha/Edifact/Transport.pm (+4 lines)
Lines 136-145 sub sftp_download { Link Here
136
    # C = ready to retrieve E = Edifact
136
    # C = ready to retrieve E = Edifact
137
    my $msg_hash = $self->message_hash();
137
    my $msg_hash = $self->message_hash();
138
    my @downloaded_files;
138
    my @downloaded_files;
139
    my $port = $self->{account}->download_port ? $self->{account}->download_port : '22';
139
    my $sftp = Net::SFTP::Foreign->new(
140
    my $sftp = Net::SFTP::Foreign->new(
140
        host     => $self->{account}->host,
141
        host     => $self->{account}->host,
141
        user     => $self->{account}->username,
142
        user     => $self->{account}->username,
142
        password => Koha::Encryption->new->decrypt_hex($self->{account}->password),
143
        password => Koha::Encryption->new->decrypt_hex($self->{account}->password),
144
        port     => $port,
143
        timeout  => 10,
145
        timeout  => 10,
144
    );
146
    );
145
    if ( $sftp->error ) {
147
    if ( $sftp->error ) {
Lines 293-302 sub ftp_upload { Link Here
293
295
294
sub sftp_upload {
296
sub sftp_upload {
295
    my ( $self, @messages ) = @_;
297
    my ( $self, @messages ) = @_;
298
    my $port = $self->{account}->upload_port ? $self->{account}->upload_port : '22';
296
    my $sftp = Net::SFTP::Foreign->new(
299
    my $sftp = Net::SFTP::Foreign->new(
297
        host     => $self->{account}->host,
300
        host     => $self->{account}->host,
298
        user     => $self->{account}->username,
301
        user     => $self->{account}->username,
299
        password => Koha::Encryption->new->decrypt_hex($self->{account}->password),
302
        password => Koha::Encryption->new->decrypt_hex($self->{account}->password),
303
        port     => $port,
300
        timeout  => 10,
304
        timeout  => 10,
301
    );
305
    );
302
    $sftp->die_on_error("Cannot ssh to $self->{account}->host");
306
    $sftp->die_on_error("Cannot ssh to $self->{account}->host");
(-)a/admin/edi_accounts.pl (+2 lines)
Lines 79-84 else { Link Here
79
            host               => scalar $input->param('host'),
79
            host               => scalar $input->param('host'),
80
            username           => scalar $input->param('username'),
80
            username           => scalar $input->param('username'),
81
            password           => $password,
81
            password           => $password,
82
            upload_port        => scalar $input->param('upload_port'),
83
            download_port      => scalar $input->param('download_port'),
82
            vendor_id          => scalar $input->param('vendor_id'),
84
            vendor_id          => scalar $input->param('vendor_id'),
83
            upload_directory   => scalar $input->param('upload_directory'),
85
            upload_directory   => scalar $input->param('upload_directory'),
84
            download_directory => scalar $input->param('download_directory'),
86
            download_directory => scalar $input->param('download_directory'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/edi_accounts.tt (-1 / +4 lines)
Lines 312-317 Link Here
312
       <th>Remote host</th>
312
       <th>Remote host</th>
313
       <th>Username</th>
313
       <th>Username</th>
314
       <th>Password</th>
314
       <th>Password</th>
315
       <th>Upload port</th>
316
       <th>Download port</th>
315
       <th>Download directory</th>
317
       <th>Download directory</th>
316
       <th>Upload directory</th>
318
       <th>Upload directory</th>
317
       <th>Qualifier</th>
319
       <th>Qualifier</th>
Lines 333-338 Link Here
333
      <td>[% account.host | html %]</td>
335
      <td>[% account.host | html %]</td>
334
      <td>[% account.username | html %]</td>
336
      <td>[% account.username | html %]</td>
335
      <td>[% IF account.password %]*****[% END %]</td>
337
      <td>[% IF account.password %]*****[% END %]</td>
338
      <td>[% account.upload_port | html %]</td>
339
      <td>[% account.download_port | html %]</td>
336
      <td>[% account.download_directory | html %]</td>
340
      <td>[% account.download_directory | html %]</td>
337
      <td>[% account.upload_directory | html %]</td>
341
      <td>[% account.upload_directory | html %]</td>
338
      <td>
342
      <td>
339
- 

Return to bug 35724