smb2www parses download links wrong (especially with deeper trees)

Bug #871884 reported by Maarten Fonville
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
smb2www (Ubuntu)
New
Undecided
Unassigned

Bug Description

Because of the wrong parsing Apache will give an error like:
NT_STATUS_OBJECT_NAME_INVALID opening remote file \\Foldername/Filename.txt
while the actual URL that should be retrieved is:
\\hostname\Sharename\TopFolder\Foldername\Filename.txt

The error can be resolved by changing in the file /usr/share/perl5/smb2www.pm and in /usr/lib/cgi-bin/samba/smbfile.pl
$file =~ s/^(.*)\/([^\/]*)$/$1$2/ ;
to
$file =~ s/^(.*)(\/[^\/]*)$/$1$2/ ;

(and also it is useful to afterwards change all the forward slashes of the directories to backslashes to prevent other irregular problems:
$file =~ s/\//\\/g ;
)

summary: - smb2www parses download links sometimes wrong (especially with deeper
- trees)
+ smb2www parses download links wrong (especially with deeper trees)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.