#110 Two letter directories fail

v0.9.4
closed-fixed
Browsing (93)
5
2005-09-09
2005-06-30
Anonymous
No

Using version 0.9.4
no error messages
Postgres DB
Plain Files

Path names consisting of only 2 letters are not
displayed. E.g. browsing in linux/fs/ the displayed
directory remains at linux/.

Found the bug in sub clean_path:
# Clean out /../
while ($path =~ m!/../!) {
$path = s!/\.\./!/!g;

The first regex matches any two letters, it should be
escaped with \:
# Clean out /../
while ($path =~ m!/\.\./!) {
$path = s!/\.\./!/!g;

feedback or questions to: t.lehnig <at> gmx <dot> de.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    --- Common.pm.old 2005-07-14 15:54:29.000000000 +0800
    +++ Common.pm 2005-07-14 15:55:21.000000000 +0800
    @@ -541,7 +541,7 @@
    # First suppress anything after a dodgy
    character
    $path =~ s!(^[\w_+-,.%^/]+).*!$1!;
    # Clean out /../
    - while ($path =~ m!/../!) {
    + while ($path =~ m!/\.\./!) {
    $path = s!/\.\./!/!g;
    }
    }

    I found the problem, too

     
  • Malcolm Box

    Malcolm Box - 2005-09-09
    • assigned_to: nobody --> mbox
    • status: open --> closed-fixed
     
  • Malcolm Box

    Malcolm Box - 2005-09-09

    Logged In: YES
    user_id=215386

    This has now been fixed in CVS.

    If you can install the new version and check that it solves your
    problem, then it would be very useful.

    Thanks for reporting this defect and helping to make LXR better.

     

Log in to post a comment.