From 5c5155b8d993ee9123c1ba3acd932cc2cf4a0195 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Fri, 18 Apr 2003 14:59:26 +0000 Subject: [PATCH] Only consider a path a candidate for file-serving if it exists AND is a normal file (not a directory, etc.) svn path=/trunk/icecast/; revision=4616 --- src/connection.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/connection.c b/src/connection.c index 6b419521..6c23cc8b 100644 --- a/src/connection.c +++ b/src/connection.c @@ -703,7 +703,8 @@ static void _handle_get_request(connection_t *con, free(fullpath); return; } - else if(fileserve && stat(fullpath, &statbuf) == 0) + else if(fileserve && stat(fullpath, &statbuf) == 0 && + S_ISREG(statbuf.st_mode)) { fserve_client_create(client, fullpath); free(fullpath);