Opened 11 years ago

Closed 8 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:


The file unit treats #/ and #
as file separators, for example in make-pathname:

(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 (OpenBSD)

#;1> (use files)
; loading /home/ckeen/chickens/master/lib/chicken/7/ ...
; loading library files ...
#;2> (make-pathname "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?

Change History (1)

comment:1 Changed 8 years ago by sjamaan

Resolution: fixed
Status: newclosed

This has been fixed when we discovered CVE-2015-8235 in Spiffy caused by this mishandling.

Note: See TracTickets for help on using tickets.