You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using league/flysystem-webdav, file paths that include the # character are truncated, causing unexpected behavior. This issue arises because the library applies parse_url() to paths, which interprets # as a fragment identifier and discards everything following it. For example, a file named file#example.txt is processed as file, resulting in data loss and errors when attempting to interact with files that contain # in their names.
Steps to Reproduce
Create a file in WebDAV storage with a # in its name, e.g., file#example.txt.
Attempt to list the contents of the directory using the listContents function.
Observe that the file name is truncated at the #, leading to failed operations.
Expected Behavior
The library should treat # as a valid character within the file path and not interpret it as a URL fragment identifier. The entire file name, including the #, should be preserved.
Actual Behavior
The library truncates the path at the # character due to parse_url() processing, which results in incorrect file paths.
Suggested Fix
I modified the code in WebDAVAdapter as follows to address this issue:
Bug Report
Description
When using
league/flysystem-webdav
, file paths that include the#
character are truncated, causing unexpected behavior. This issue arises because the library appliesparse_url()
to paths, which interprets#
as a fragment identifier and discards everything following it. For example, a file namedfile#example.txt
is processed asfile
, resulting in data loss and errors when attempting to interact with files that contain#
in their names.Steps to Reproduce
#
in its name, e.g.,file#example.txt
.listContents
function.#
, leading to failed operations.Expected Behavior
The library should treat
#
as a valid character within the file path and not interpret it as a URL fragment identifier. The entire file name, including the#
, should be preserved.Actual Behavior
The library truncates the path at the
#
character due toparse_url()
processing, which results in incorrect file paths.Suggested Fix
I modified the code in WebDAVAdapter as follows to address this issue:
Old:
New:
With this change, paths are correctly reconstructed to include the
#
fragment, preserving the original file names.The text was updated successfully, but these errors were encountered: