]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Strip trailing slash from regex paths to prevent sandboxing issues.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Tue, 11 Dec 2012 19:24:22 +0000 (19:24 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Tue, 11 Dec 2012 19:24:22 +0000 (19:24 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10747 7a7537e8-13f0-0310-91df-b6672ffda945

scheduler/process.c

index 055e114614092ffd2f3d66e598b9752e5377bad4..4a098582117e7584002e5c0bb101ecd775bd8d83 100644 (file)
@@ -638,6 +638,9 @@ cupsd_requote(char       *dst,              /* I - Destination buffer */
   {
     ch = *src++;
 
+    if (ch == '/' && !*src)
+      break;                           /* Don't add trailing slash */
+
     if (strchr(".?*()[]^$\\", ch))
       *dstptr++ = '\\';