SiT! Bugs

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001713SiT!configpublic2011-09-05 16:262012-07-07 18:10
Reporternicdev 
Assigned Toivan 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.65 LTS 
Target Version3.66 LTSFixed in Version3.66 LTS 
Summary0001713: The function: clean_fspath($string) removes ":" from the strings which breaks file paths in Windows
DescriptionThe following function:
function clean_fspath($string) removes (amongst others) the ":" from the FS path which breaks the FS paths in windows.

For example "D:\wamp\www\sit\logs\sit.log"

becomes "D\wamp\www\sit\logs\sit.log", which causes an error "Debug log not found"
TagsNo tags attached.
Attached Files

- Relationships
has duplicate 0001756resolvedpaulh clean_fspath() removes the ":" from windows paths 

-  Notes
User avatar (0004296)
ivan (administrator)
2011-09-06 11:18

Fixed in svn r7396. Updated function which goes in base.inc.php is pasted below for convenience...


/**
 * Make a string safe for use with file related functions
 * @author Ivan Lucas
 * @param string $string Text the clean
 * @return mixed - DB safe
 * @note Does not imply any other filtering, only safe for file functions
 */
function clean_fspath($string)
{
    $string = strip_tags($string);

    $bad = array('://', '..', '.htaccess', '.htpasswd', "\n", "\r", "\x00", "?", "*", '[', ']');
    $string = str_replace($bad,'', $string);

    return $string;
}

- Issue History
Date Modified Username Field Change
2011-09-05 16:26 nicdev New Issue
2011-09-05 16:31 ivan Severity minor => major
2011-09-05 16:31 ivan Status new => confirmed
2011-09-06 11:01 ivan Target Version => 3.66 LTS
2011-09-06 11:18 ivan Note Added: 0004296
2011-09-06 11:18 ivan Status confirmed => resolved
2011-09-06 11:18 ivan Fixed in Version => Current SVN
2011-09-06 11:18 ivan Resolution open => fixed
2011-09-06 11:18 ivan Assigned To => ivan
2012-01-13 19:39 paulh Relationship added has duplicate 0001756
2012-07-06 14:13 Tomse Fixed in Version Current SVN => 3.66 LTS
2012-07-07 18:10 ivan Status resolved => closed


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker