>From 7c4e219b6a5e7ab4435d463e79ce92f5425d166e Mon Sep 17 00:00:00 2001 From: Christian Kellermann Date: Sat, 18 Feb 2012 21:19:13 +0100 Subject: [PATCH] Ignore . and .., forbid slashes in egg names in chicken-install Those are bogus names and the user's intention when issuing a 'chicken-install .' is probably to install the egg in the current directory. This also triggered a bug in the henrietta cgi script on the egg servers which is to be fixed in a separate patch. As an additional precaution, make egg names containing slashes illegal (thanks to Felix for this suggestions). --- chicken-install.scm | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/chicken-install.scm b/chicken-install.scm index f1eceb9..3fb6476 100644 --- a/chicken-install.scm +++ b/chicken-install.scm @@ -989,6 +989,13 @@ EOF ((string=? "-show-foreign-depends" arg) (set! *show-foreign-depends* #t) (loop (cdr args) eggs)) + ((string-contains arg "/") + (error "Illegal eggname " arg)) + ((or (string=? ".." arg) (string=? "." arg)) + (warning + (string-append + "ignoring " arg ", as it is a bogus egg name.")) + (loop (cdr args) eggs)) ((and (positive? (string-length arg)) (char=? #\- (string-ref arg 0))) (if (> (string-length arg) 2) -- 1.7.6