[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [17319] ssh2 bug in php
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [17319] ssh2 bug in php |
Date: |
Thu, 16 Nov 2017 13:17:25 -0500 (EST) |
Revision: 17319
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17319
Author: sigurdne
Date: 2017-11-16 13:17:24 -0500 (Thu, 16 Nov 2017)
Log Message:
-----------
ssh2 bug in php
Modified Paths:
--------------
trunk/property/inc/cron/default/Import_fra_agresso_X205.php
trunk/property/inc/export/default/Agresso_X114
Modified: trunk/property/inc/cron/default/Import_fra_agresso_X205.php
===================================================================
--- trunk/property/inc/cron/default/Import_fra_agresso_X205.php 2017-11-16
15:40:53 UTC (rev 17318)
+++ trunk/property/inc/cron/default/Import_fra_agresso_X205.php 2017-11-16
18:17:24 UTC (rev 17319)
@@ -316,7 +316,8 @@
// Scan directory
$files = array();
echo "Scanning
{$directory_remote}<br/>";
- $dir =
"ssh2.sftp://$sftp$directory_remote";
+ // $dir =
"ssh2.sftp://$sftp$directory_remote";
+ $dir = "ssh2.sftp://" . (int)$sftp .
"$directory_remote";
$handle = opendir($dir);
while (false !== ($file =
readdir($handle)))
{
@@ -354,8 +355,8 @@
$file_remote =
"{$directory_remote}/{$file_name}";
$file_local =
"{$directory_local}/{$file_name}";
- $stream =
fopen("ssh2.sftp://$sftp$file_remote", 'r');
- $contents =
fread($stream, filesize("ssh2.sftp://$sftp$file_remote"));
+ $stream =
fopen("ssh2.sftp://" . (int)$sftp . "$file_remote", 'r');
+ $contents =
fread($stream, filesize("ssh2.sftp://" . (int)$sftp . "$file_remote"));
fclose($stream);
$fp =
fopen($file_local, "wb");
Modified: trunk/property/inc/export/default/Agresso_X114
===================================================================
--- trunk/property/inc/export/default/Agresso_X114 2017-11-16 15:40:53 UTC
(rev 17318)
+++ trunk/property/inc/export/default/Agresso_X114 2017-11-16 18:17:24 UTC
(rev 17319)
@@ -1097,7 +1097,7 @@
break;
case 'ssh';
$sftp = ssh2_sftp($connection);
- $stream =
@fopen("ssh2.sftp://$sftp$remote_file", 'w');
+ $stream = @fopen("ssh2.sftp://"
. (int)$sftp . "$remote_file", 'w');
$data_to_send =
@file_get_contents($Filnavn);
fwrite($stream, $data_to_send);
$transfer_ok = @fclose($stream);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [17319] ssh2 bug in php,
sigurdne <=