author | John Beck <John.Beck@Oracle.COM> |
Fri, 21 Apr 2017 13:14:17 -0700 | |
branch | s11u3-sru |
changeset 7934 | 2b9fc4cafd1f |
parent 3387 | 37e41c9fcb4f |
permissions | -rw-r--r-- |
3387
37e41c9fcb4f
19276003 problem in UTILITY/CUPS
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff
changeset
|
1 |
See : http://www.cups.org/str.php?L4356 for details. |
37e41c9fcb4f
19276003 problem in UTILITY/CUPS
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff
changeset
|
2 |
|
37e41c9fcb4f
19276003 problem in UTILITY/CUPS
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff
changeset
|
3 |
Index: scheduler/client.c |
37e41c9fcb4f
19276003 problem in UTILITY/CUPS
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff
changeset
|
4 |
=================================================================== |
37e41c9fcb4f
19276003 problem in UTILITY/CUPS
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff
changeset
|
5 |
--- scheduler/client.c |
37e41c9fcb4f
19276003 problem in UTILITY/CUPS
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff
changeset
|
6 |
+++ scheduler/client.c |
37e41c9fcb4f
19276003 problem in UTILITY/CUPS
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff
changeset
|
7 |
@@ -4251,6 +4251,14 @@ |
37e41c9fcb4f
19276003 problem in UTILITY/CUPS
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff
changeset
|
8 |
return (0); |
37e41c9fcb4f
19276003 problem in UTILITY/CUPS
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff
changeset
|
9 |
|
37e41c9fcb4f
19276003 problem in UTILITY/CUPS
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff
changeset
|
10 |
/* |
37e41c9fcb4f
19276003 problem in UTILITY/CUPS
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff
changeset
|
11 |
+ * Check for "<" or quotes in the path and reject since this is probably |
37e41c9fcb4f
19276003 problem in UTILITY/CUPS
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff
changeset
|
12 |
+ * someone trying to inject HTML... |
37e41c9fcb4f
19276003 problem in UTILITY/CUPS
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff
changeset
|
13 |
+ */ |
37e41c9fcb4f
19276003 problem in UTILITY/CUPS
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff
changeset
|
14 |
+ |
37e41c9fcb4f
19276003 problem in UTILITY/CUPS
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff
changeset
|
15 |
+ if (strchr(path, '<') != NULL || strchr(path, '\"') != NULL || strchr(path, '\'') != NULL) |
37e41c9fcb4f
19276003 problem in UTILITY/CUPS
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff
changeset
|
16 |
+ return (0); |
37e41c9fcb4f
19276003 problem in UTILITY/CUPS
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff
changeset
|
17 |
+ |
37e41c9fcb4f
19276003 problem in UTILITY/CUPS
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff
changeset
|
18 |
+ /* |
37e41c9fcb4f
19276003 problem in UTILITY/CUPS
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff
changeset
|
19 |
* Check for "/.." in the path... |
37e41c9fcb4f
19276003 problem in UTILITY/CUPS
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff
changeset
|
20 |
*/ |
37e41c9fcb4f
19276003 problem in UTILITY/CUPS
Mohana Rao Gorai <mohana.gorai@oracle.com>
parents:
diff
changeset
|
21 |