Opened 12 years ago
Closed 9 years ago
#1008 closed defect (fixed)
file unit treats slash and backslash as path separators even on systems where they aren't
Reported by: | Christian Kellermann | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | someday |
Component: | core libraries | Version: | 4.8.x |
Keywords: | files unit dir separators all suck even on windows | Cc: | |
Estimated difficulty: |
Description
The file unit treats #/ and #
as file separators, for example in make-pathname:
CHICKEN (c) 2008-2013, The Chicken Team (c) 2000-2007, Felix L. Winkelmann Version 4.8.2 (rev e1e5193) openbsd-unix-gnu-x86 [ manyargs dload ptables ] compiled 2013-04-16 on necronomicon.my.domain (OpenBSD) #;1> (use files) ; loading /home/ckeen/chickens/master/lib/chicken/7/files.import.so ... ; loading library files ... #;2> (make-pathname "foo/bar" "\\") "foo/bar/"
In this example the totally valid unix file/directory name backslash "\" is stripped by make-pathname.
This begs the question of the file unit's purpose:
- should it use the current system's separator?
- should it use some other configurable separator?
- should it use the target's systems separator (cross-chickens)?
- all of the above depending on some API?
Note: See
TracTickets for help on using
tickets.
This has been fixed when we discovered CVE-2015-8235 in Spiffy caused by this mishandling.