Bug 133677 - File sharing doesn't work with 2-character long home directories
Summary: File sharing doesn't work with 2-character long home directories
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-06 22:53 UTC by Marcus Trautwig
Modified: 2006-09-07 00:12 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
This patch fixes the problem (325 bytes, patch)
2006-09-06 22:57 UTC, Marcus Trautwig
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Trautwig 2006-09-06 22:53:46 UTC
Version:            (using KDE KDE 3.5.4)
Installed from:    Ubuntu Packages

Because of an incorrect regular expression, sharing files below e.g. /home/mt/ isn't allowed with the error message "invalid mount point".
The bug lies in the file /usr/bin/fileshareset in line 121, where the two dots are not escaped and so meaning "two arbitrary chars" instead of "..".
Comment 1 Marcus Trautwig 2006-09-06 22:57:33 UTC
Created attachment 17654 [details]
This patch fixes the problem

Patch against KDE 3.5.4, corrects the regular expression.
Comment 2 Andreas Kling 2006-09-07 00:08:37 UTC
SVN commit 581632 by kling:

Fixed an issue with two-letter directories being mistaken for '..' and therefore denied.
Thanks to Marcus Trautwig for the patch.

BUG: 133677


 M  +1 -1      fileshareset  


--- branches/KDE/3.5/kdelibs/kio/misc/fileshareset #581631:581632
@@ -118,7 +118,7 @@
     local ($_) = @_;
     my $ok = 1;
     $ok &&= m|^/|;
-    $ok &&= !m|/../|;
+    $ok &&= !m|/\.\./|;
     $ok &&= !m|[\0\n\r]|;
     $ok &&= -d $_;
     $ok &&= own($_);
Comment 3 Andreas Kling 2006-09-07 00:12:25 UTC
SVN commit 581634 by kling:

Fixed an issue with two-letter directories being mistaken for '..' and therefore denied. 
Thanks to Marcus Trautwig for the patch. 

CCBUG: 133677


 M  +1 -1      fileshareset  


--- trunk/KDE/kdelibs/kio/misc/fileshareset #581633:581634
@@ -118,7 +118,7 @@
     local ($_) = @_;
     my $ok = 1;
     $ok &&= m|^/|;
-    $ok &&= !m|/../|;
+    $ok &&= !m|/\.\./|;
     $ok &&= !m|[\0\n\r]|;
     $ok &&= -d $_;
     $ok &&= own($_);