]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - scheduler/client.c
Update CGI documentation and add testable examples for CGI support (Issue #5940)
[thirdparty/cups.git] / scheduler / client.c
index ba54117e684759d30b2d03fea2059a28adc00273..0126ef02daec31edd8ff9a4f0eb79bc4497787d5 100644 (file)
@@ -2,7 +2,7 @@
  * Client routines for the CUPS scheduler.
  *
  * Copyright © 2021 by OpenPrinting.
- * Copyright © 2007-2019 by Apple Inc.
+ * Copyright © 2007-2021 by Apple Inc.
  * Copyright © 1997-2007 by Easy Software Products, all rights reserved.
  *
  * This file contains Kerberos support code, copyright 2006 by
@@ -3120,8 +3120,7 @@ is_cgi(cupsd_client_t *con,               /* I - Client connection */
     return (0);
   }
 
-  if (!_cups_strcasecmp(type->type, "x-httpd-cgi") &&
-      (filestats->st_mode & 0111))
+  if (!_cups_strcasecmp(type->type, "x-httpd-cgi") && (filestats->st_mode & 0111) && (getuid() || !(filestats->st_mode & 022)))
   {
    /*
     * "application/x-httpd-cgi" is a CGI script.