<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>312178</bug_id>
          
          <creation_ts>2012-12-24 21:41:12 +0000</creation_ts>
          <short_desc>file system boundary check fails</short_desc>
          <delta_ts>2013-01-05 16:08:12 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>filelight</product>
          <component>general</component>
          <version>1.12</version>
          <rep_platform>Compiled Sources</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Stefan Majewsky">majewsky</reporter>
          <assigned_to name="Martin Sandsmark">martin.sandsmark</assigned_to>
          
          
          <cf_commitlink>http://commits.kde.org/filelight/93e3bdfdf3cbc144919af5c78a6616bf29e54d2b</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>20</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1326300</commentid>
    <comment_count>0</comment_count>
    <who name="Stefan Majewsky">majewsky</who>
    <bug_when>2012-12-24 21:41:12 +0000</bug_when>
    <thetext>I&apos;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 &quot;/&quot; and &quot;/home&quot;. But the check for stop-at-filesystem-boundary does not work since it the path it checks is &quot;/home/&quot;, not &quot;/home&quot;.

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

Reproducible: Always</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1326301</commentid>
    <comment_count>1</comment_count>
      <attachid>76001</attachid>
    <who name="Stefan Majewsky">majewsky</who>
    <bug_when>2012-12-24 21:43:11 +0000</bug_when>
    <thetext>Created attachment 76001
Patch that removes the uncalled-for trailing slash when the path is checked

I&apos;ve added extra much context to the patch so you can see which block of code the slash-append is moving past.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1327489</commentid>
    <comment_count>2</comment_count>
    <who name="Martin Sandsmark">martin.sandsmark</who>
    <bug_when>2012-12-30 19:27:22 +0000</bug_when>
    <thetext>Git commit 4b9e4209f537ac061f91477855447c59e8da6830 by Martin T. H. Sandsmark.
Committed on 30/12/2012 at 20:26.
Pushed by sandsmark into branch &apos;master&apos;.

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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1328860</commentid>
    <comment_count>3</comment_count>
    <who name="Martin Sandsmark">martin.sandsmark</who>
    <bug_when>2013-01-05 16:08:12 +0000</bug_when>
    <thetext>Git commit 93e3bdfdf3cbc144919af5c78a6616bf29e54d2b by Martin T. H. Sandsmark.
Committed on 30/12/2012 at 20:26.
Pushed by sandsmark into branch &apos;KDE/4.10&apos;.

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</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>76001</attachid>
            <date>2012-12-24 21:43:11 +0000</date>
            <delta_ts>2012-12-24 21:43:11 +0000</delta_ts>
            <desc>Patch that removes the uncalled-for trailing slash when the path is checked</desc>
            <filename>patch</filename>
            <type>text/plain</type>
            <size>1447</size>
            <attacher name="Stefan Majewsky">majewsky</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL3NyYy9wYXJ0L2xvY2FsTGlzdGVyLmNwcCBiL3NyYy9wYXJ0L2xvY2FsTGlz
dGVyLmNwcAppbmRleCBkZDQwMGYyLi5kNTY5NWJkIDEwMDY0NAotLS0gYS9zcmMvcGFydC9sb2Nh
bExpc3Rlci5jcHAKKysrIGIvc3JjL3BhcnQvbG9jYWxMaXN0ZXIuY3BwCkBAIC0xOTAsMzIgKzE5
MCwzNSBAQCBMb2NhbExpc3Rlcjo6c2Nhbihjb25zdCBRQnl0ZUFycmF5ICZwYXRoLCBjb25zdCBR
Qnl0ZUFycmF5ICZkaXJuYW1lKQogICAgICAgICAgICAgY3dkLT5hcHBlbmQoZW50LT5kX25hbWUs
IHN0YXRidWYuc3Rfc2l6ZSk7CiAjZW5kaWYKIAogICAgICAgICBlbHNlIGlmIChTX0lTRElSKHN0
YXRidWYuc3RfbW9kZSkpIC8vZm9sZGVyCiAgICAgICAgIHsKICAgICAgICAgICAgIEZvbGRlciAq
ZCA9IDA7CiAgICAgICAgICAgICBRQnl0ZUFycmF5IG5ld19kaXJuYW1lID0gZW50LT5kX25hbWU7
CiAgICAgICAgICAgICBuZXdfZGlybmFtZSArPSAnLyc7Ci0gICAgICAgICAgICBuZXdfcGF0aCAg
ICArPSAnLyc7CiAKICAgICAgICAgICAgIC8vY2hlY2sgdG8gc2VlIGlmIHdlJ3ZlIHNjYW5uZWQg
dGhpcyBzZWN0aW9uIGFscmVhZHkKIAogICAgICAgICAgICAgZm9yIChJdGVyYXRvcjxGb2xkZXI+
IGl0ID0gbV90cmVlcy0+aXRlcmF0b3IoKTsgaXQgIT0gbV90cmVlcy0+ZW5kKCk7ICsraXQpCiAg
ICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgaWYgKG5ld19wYXRoID09ICgqaXQpLT5uYW1l
OEJpdCgpKQogICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAga0RlYnVnKCkg
PDwgIlRyZWUgcHJlLWNvbXBsZXRlZDogIiA8PCAoKml0KS0+bmFtZSgpOwogICAgICAgICAgICAg
ICAgICAgICBkID0gaXQucmVtb3ZlKCk7CiAgICAgICAgICAgICAgICAgICAgIG1fcGFyZW50LT5t
X2ZpbGVzICs9IGQtPmNoaWxkcmVuKCk7CiAgICAgICAgICAgICAgICAgICAgIC8vKioqKiBpZGVh
bGx5IGRvbid0IGhhdmUgdGhpcyByZWR1bmRhbnQgZXh0cmEgc29tZWhvdwogICAgICAgICAgICAg
ICAgICAgICBjd2QtPmFwcGVuZChkLCBuZXdfZGlybmFtZSk7CiAgICAgICAgICAgICAgICAgfQog
ICAgICAgICAgICAgfQogCisgICAgICAgICAgICAvLyBkbyB0aGlzIGFmdGVyIHRoZSBtX3RyZWVz
IGNoZWNrIHNpbmNlIHRoZSBwYXRocyBpbiB0aGVyZQorICAgICAgICAgICAgLy8gbGFjayBhIHRy
YWlsaW5nIHNsYXNoCisgICAgICAgICAgICBuZXdfcGF0aCArPSAnLyc7CisKICAgICAgICAgICAg
IGlmICghZCkgLy90aGVuIHNjYW4KICAgICAgICAgICAgICAgICBpZiAoKGQgPSBzY2FuKG5ld19w
YXRoLCBuZXdfZGlybmFtZSkpKSAvL3RoZW4gc2NhbiB3YXMgc3VjY2Vzc2Z1bAogICAgICAgICAg
ICAgICAgICAgICBjd2QtPmFwcGVuZChkKTsKICAgICAgICAgfQogCiAgICAgICAgICsrbV9wYXJl
bnQtPm1fZmlsZXM7CiAgICAgfQogCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>