Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#493 get_share vs add_share - different path syntax

v2.15
closed
nobody
5
2012-09-17
2006-07-14
Danila Ulyanov
No

2.15 final 9
classes/filesystem.class.inc

function add_share (line 331) uses:
$path = addslashes($path);
$path = dirname($path).'/'.basename($path);

function get_share (line 430) uses:
$path = addslashes($path)

So when we add share to database we add
/path/to/dir
But when we want to read that share we look for
/path/to/dir/

Since /path/to/dir/ is not in the database, it returns
false. Need to either strip slashes off get_share, or
add slashes to add_share.

Discussion

  • Danila Ulyanov
    Danila Ulyanov
    2006-07-14

    Logged In: YES
    user_id=1198484

    delete_share also has addslashes, just like get_share, so
    you may want to modify add_share then.