Check for regular file in mod_cgi, so we don't try to start directories

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2439 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.23
Stefan Bühler 14 years ago
parent c634a51de6
commit ff5c18bee8

@ -16,6 +16,7 @@ NEWS
* Fix mod_proxy RoundRobin (off by one problem if only one backend is up)
* Rename configure.in to configure.ac, with small cleanups (fixes #1932)
* Add proper SUID bit detection (fixes #416)
* Check for regular file in mod_cgi, so we don't try to start directories
- 1.4.22 - 2009-03-07
* Fix wrong lua type for CACHE_MISS/CACHE_HIT in mod_cml (fixes #533)

@ -24,6 +24,7 @@
#include <fcntl.h>
#include "server.h"
#include "stat_cache.h"
#include "keyvalue.h"
#include "log.h"
#include "connections.h"
@ -1207,6 +1208,7 @@ URIHANDLER_FUNC(cgi_is_handled) {
size_t k, s_len;
plugin_data *p = p_d;
buffer *fn = con->physical.path;
stat_cache_entry *sce = NULL;
if (con->mode != DIRECT) return HANDLER_GO_ON;
@ -1214,6 +1216,9 @@ URIHANDLER_FUNC(cgi_is_handled) {
mod_cgi_patch_connection(srv, con, p);
if (HANDLER_ERROR == stat_cache_get_entry(srv, con, con->physical.path, &sce)) return HANDLER_GO_ON;
if (!S_ISREG(sce->st.st_mode)) return HANDLER_GO_ON;
s_len = fn->used - 1;
for (k = 0; k < p->conf.cgi->used; k++) {

Loading…
Cancel
Save