From 57e6e0c2b50b3a838f7a1be8ef02d2f9caa21ed3 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Mon, 12 Sep 2005 16:51:25 +0000 Subject: [PATCH] fixes for tight-security guard svn: r838 --- collects/handin-server/utils.ss | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/collects/handin-server/utils.ss b/collects/handin-server/utils.ss index 790eb146f5..15ddeb8582 100644 --- a/collects/handin-server/utils.ss +++ b/collects/handin-server/utils.ss @@ -139,8 +139,10 @@ (string-append "^(?:" (apply string-append - (cdr (apply append (map (lambda (p) (list "|" (regexp-quote p))) - (current-library-collection-paths))))) + (cdr (apply append + (map (lambda (p) + (list "|" (regexp-quote (path->string p)))) + (current-library-collection-paths))))) ")(?:/|$)"))) (define tight-security @@ -150,7 +152,7 @@ (when (or (memq 'write modes) (memq 'execute modes) (memq 'delete modes) - (not (regexp-match ok-path-re (path->string path)))) + (and path (not (regexp-match ok-path-re (path->string path))))) (error what "file access denied (~a)" path))) (lambda (what host port mode) (error what "network access denied"))))