Bug 312178

Summary: file system boundary check fails
Product: [Applications] filelight Reporter: Stefan Majewsky <majewsky>
Component: generalAssignee: Martin Sandsmark <martin.sandsmark>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.12   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Patch that removes the uncalled-for trailing slash when the path is checked

Description Stefan Majewsky 2012-12-24 21:41:12 UTC
I'm entering this as a separate bug since the comments at bug 239825 indicate that this is a different problem.

My fstab is read properly, it recognizes the local filesystems "/" and "/home". But the check for stop-at-filesystem-boundary does not work since it the path it checks is "/home/", not "/home".

The patch I'm attaching fixes the problem for me, but you probably want to look into how to sanitize paths properly.

Reproducible: Always
Comment 1 Stefan Majewsky 2012-12-24 21:43:11 UTC
Created attachment 76001 [details]
Patch that removes the uncalled-for trailing slash when the path is checked

I've added extra much context to the patch so you can see which block of code the slash-append is moving past.
Comment 2 Martin Sandsmark 2012-12-30 19:27:22 UTC
Git commit 4b9e4209f537ac061f91477855447c59e8da6830 by Martin T. H. Sandsmark.
Committed on 30/12/2012 at 20:26.
Pushed by sandsmark into branch 'master'.

Temporary fix for ignoring paths, thanks to Stefan Majewsky for the patch.

M  +4    -1    src/part/localLister.cpp

http://commits.kde.org/filelight/4b9e4209f537ac061f91477855447c59e8da6830
Comment 3 Martin Sandsmark 2013-01-05 16:08:12 UTC
Git commit 93e3bdfdf3cbc144919af5c78a6616bf29e54d2b by Martin T. H. Sandsmark.
Committed on 30/12/2012 at 20:26.
Pushed by sandsmark into branch 'KDE/4.10'.

Temporary fix for ignoring paths, thanks to Stefan Majewsky for the patch.

M  +4    -1    src/part/localLister.cpp

http://commits.kde.org/filelight/93e3bdfdf3cbc144919af5c78a6616bf29e54d2b