1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-06-23 06:25:24 +00:00

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
This commit is contained in:
Michael Smith 2003-04-18 14:59:26 +00:00
parent a971f994c1
commit 5c5155b8d9

View File

@ -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);