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: 2021-02-21 04:22 UTC
Votes:5
Avg. Score:4.0 ± 1.3
Reproduced:4 of 5 (80.0%)
Same Version:0 (0.0%)
Same OS:3 (75.0%)
From: dkucinski at ariad dot ca Assigned: cmb (profile)
Status: No Feedback Package: ssh2 (PECL)
PHP Version: 5.6.10 OS: All
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: dkucinski at ariad dot ca
New email:
PHP Version: OS:

 

 [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

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-02-10 15:53 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2021-02-10 15:53 UTC] cmb@php.net
It seems you are referring to the fix for bug #59794, but you're
missing that resource->path is fixed in the lines below.

Note though, that this fix is no longer available as of PHP 7.3.0
(see bug #77581).
 [2021-02-21 04:22 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 15:01:28 2024 UTC