php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69945 # sign not allowed in file name
Submitted: 2015-06-26 18:05 UTC Modified: -
Votes:2
Avg. Score:3.5 ± 1.5
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: dkucinski at ariad dot ca Assigned:
Status: Open Package: ssh2 (PECL)
PHP Version: 5.6.10 OS: All
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-06-26 18:05 UTC] dkucinski at ariad dot ca
Description:
------------
Faulty implementation within php_ssh2_fopen_wraper_parse_path function (ssh2_fopen_wrappers.c) makes it impossible to open files containing # within the file name via sftp.

Comment included in lines 221-224 suggests that fragment and query are included within the path. resource->path does not include this information, fragment and query are stripped, therefore usage of # is not possible,

Test script:
---------------
$connection=ssh2_connect($host, $port);
ssh2_auth_password($connection, $username, $password);
$sftp = ssh2_sftp($connection);
$remote_file = '/SomePath/SomeFile_#.csv';
$stream = fopen("ssh2.sftp://$sftp".$remote_file, 'r');



Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue May 21 23:01:26 2019 UTC