forked from aniani/gmnisrv
check if file served as cgi is executable
if not, send a response 50 to the client fixes ~sircmpwn/gmni#47
This commit is contained in:
parent
c145ac6a65
commit
02a386b568
@ -457,6 +457,12 @@ serve_request(struct gmnisrv_client *client)
|
|||||||
assert(s != -1);
|
assert(s != -1);
|
||||||
strcpy(real_path, temp_path);
|
strcpy(real_path, temp_path);
|
||||||
} else if (S_ISREG(st.st_mode)) {
|
} else if (S_ISREG(st.st_mode)) {
|
||||||
|
if (route->cgi && access(real_path, X_OK)) {
|
||||||
|
client_submit_response(client,
|
||||||
|
GEMINI_STATUS_PERMANENT_FAILURE, "Internal Server Error", NULL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
// Don't serve special files
|
// Don't serve special files
|
||||||
|
Loading…
Reference in New Issue
Block a user