#1001 closed change request (fixed)
Do not implicitly expand ~ in pathnames
Reported by: | Mario Domenech Goulart | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 4.9.0 |
Component: | unknown | Version: | 4.8.x |
Keywords: | ##sys#expand-home-path, ~ expansion | Cc: | |
Estimated difficulty: |
Description (last modified by )
Some procedures available in Chicken implicitly expand ~
to the user home directory if it is the first character in pathnames. They also expand environment variables if pathnames start with $
.
The expansions are performed by ##sys#expand-home-path
(library.scm).
Florian Zumbiehl submited a patch to chicken-hackers proposing the removal of ##sys#expand-home-path
. It received some modifications by other contributors. The most recent version of that patch at the time of this writing is here.
This change is controversial, since it may break code that rely on the implicit expansion of pathnames. On the other hand, implicit expansion of pathnames may lead to unexpected behaviors or even security vulnerabilities (examples).
Another source of controversy is that some people consider the implicit expansion of pathnames as a convenience and other people consider it inconvenient.
Alternatives to minimize or work around the possible breakage caused by the removal of the implicit expansion of pathnames have been proposed along the chicken-hackers thread in question.
It seems that there is a consensus on the removal of the implicit expansion of environment variables in pathnames, so this change request is to eliminate the implicit expansion of ~
in pathnames, which is performed by some procedures provided by the Chicken core.
The discussion period is open and will end on 2013-04-11, when the official poll will be conducted.
Attachments (2)
Change History (11)
comment:1 Changed 12 years ago by
Description: | modified (diff) |
---|---|
Summary: | Should ~ in pathnames be implicit expanded? → Do not implicitly expand ~ in pathnames |
comment:2 Changed 12 years ago by
Changed 12 years ago by
Attachment: | 0001-added-ep-procedure-to-utils-unit-for-explicitly-expa.patch added |
---|
comment:4 Changed 12 years ago by
Uh, not complete enough. This one adds types.db and import-lib entries.
comment:5 follow-up: 6 Changed 12 years ago by
comment:6 Changed 12 years ago by
comment:7 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
This poll has been closed. Since all voters opted for "no", CHICKEN procedures won't implicitly expand ~ in pathnames.
Now, back to polishing patches to implement that.
comment:8 Changed 12 years ago by
Note that the current behaviour can only be deprecated or too much old code would break.
Changed 11 years ago by
Attachment: | 0001-added-ep-procedure-to-utils-unit-for-explicitly-expa-v2.patch added |
---|
Felix's patch modified to be cleanly applied to master as of 2013-07-09
comment:9 Changed 11 years ago by
We have decided to remove the implicit expansions from the core and implement the expansions in an egg. See http://lists.gnu.org/archive/html/chicken-hackers/2013-11/msg00077.html for the discussion and decisions.
The current situation at the time of this writing is: 4.9.0 will deprecate implicit expansions and 4.10.0 will remove them.
Attached is a patch that provides
ep
, a procedure performing explicit tilde-expansion in pathnames, a suggestion by sjamaan.