This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | const filetype = {}; |
||
0 ignored issues
–
show
Backwards Compatibility
introduced
by
![]() |
|||
2 | // add file extensions like this: filetype["extension"] = "filetype": |
||
3 | filetype["bat"] = "batchfile"; |
||
0 ignored issues
–
show
|
|||
4 | filetype["cmd"] = "batchfile"; |
||
0 ignored issues
–
show
|
|||
5 | filetype["h"] = "c_cpp"; |
||
0 ignored issues
–
show
|
|||
6 | filetype["c"] = "c_cpp"; |
||
0 ignored issues
–
show
|
|||
7 | filetype["clj"] = "clojure"; |
||
0 ignored issues
–
show
|
|||
8 | filetype["coffee"] = "coffee"; // coffescript can be compiled to javascript |
||
0 ignored issues
–
show
|
|||
9 | filetype["cpp"] = "c_cpp"; |
||
0 ignored issues
–
show
|
|||
10 | filetype["cs"] = "csharp"; |
||
0 ignored issues
–
show
|
|||
11 | filetype["css"] = "css"; |
||
0 ignored issues
–
show
|
|||
12 | filetype["groovy"] = "groovy"; |
||
0 ignored issues
–
show
|
|||
13 | filetype["htm"] = "html"; |
||
0 ignored issues
–
show
|
|||
14 | filetype["html"] = "html"; |
||
0 ignored issues
–
show
|
|||
15 | filetype["tt"] = "html"; |
||
0 ignored issues
–
show
|
|||
16 | filetype["java"] = "java"; |
||
0 ignored issues
–
show
|
|||
17 | filetype["js"] = "javascript"; |
||
0 ignored issues
–
show
|
|||
18 | filetype["jsm"] = "javascript"; |
||
0 ignored issues
–
show
|
|||
19 | filetype["json"] = "json"; |
||
0 ignored issues
–
show
|
|||
20 | filetype["latex"] = "latex"; |
||
0 ignored issues
–
show
|
|||
21 | filetype["tex"] = "latex"; |
||
0 ignored issues
–
show
|
|||
22 | filetype["less"] = "less"; |
||
0 ignored issues
–
show
|
|||
23 | filetype["ly"] = "latex"; |
||
0 ignored issues
–
show
|
|||
24 | filetype["ily"] = "latex"; |
||
0 ignored issues
–
show
|
|||
25 | filetype["lua"] = "lua"; |
||
0 ignored issues
–
show
|
|||
26 | filetype["markdown"] = "markdown"; |
||
0 ignored issues
–
show
|
|||
27 | filetype["md"] = "markdown"; |
||
0 ignored issues
–
show
|
|||
28 | filetype["mdown"] = "markdown"; |
||
0 ignored issues
–
show
|
|||
29 | filetype["mdwn"] = "markdown"; |
||
0 ignored issues
–
show
|
|||
30 | filetype["mkd"] = "markdown"; |
||
0 ignored issues
–
show
|
|||
31 | filetype["ml"] = "ocaml"; |
||
0 ignored issues
–
show
|
|||
32 | filetype["mli"] = "ocaml"; |
||
0 ignored issues
–
show
|
|||
33 | filetype["pl"] = "perl"; |
||
0 ignored issues
–
show
|
|||
34 | filetype["php"] = "php"; |
||
0 ignored issues
–
show
|
|||
35 | filetype["ps1"] = "powershell"; |
||
0 ignored issues
–
show
|
|||
36 | filetype["py"] = "python"; |
||
0 ignored issues
–
show
|
|||
37 | filetype["rb"] = "ruby"; |
||
0 ignored issues
–
show
|
|||
38 | filetype["scad"] = "scad"; // seems to be something like 3d model files printed with e.g. reprap |
||
0 ignored issues
–
show
|
|||
39 | filetype["scala"] = "scala"; |
||
0 ignored issues
–
show
|
|||
40 | filetype["scss"] = "scss"; // "sassy css" |
||
0 ignored issues
–
show
|
|||
41 | filetype["sh"] = "sh"; |
||
0 ignored issues
–
show
|
|||
42 | filetype["sql"] = "sql"; |
||
0 ignored issues
–
show
|
|||
43 | filetype["svg"] = "svg"; |
||
0 ignored issues
–
show
|
|||
44 | filetype["textile"] = "textile"; // related to markdown |
||
0 ignored issues
–
show
|
|||
45 | filetype["xml"] = "xml"; |
||
0 ignored issues
–
show
|
|||
46 | |||
47 | const loaders = {}; |
||
0 ignored issues
–
show
|
|||
48 | // add loader like this: loaders["filetype"] = () => require("promise?brace/mode/filetype"): |
||
49 | |||
50 | // note that these require statements can't be generated from the filetypes dynamically |
||
51 | // to make sure webpack can analyse our dependencies |
||
52 | loaders["batchfile"] = () => import( |
||
0 ignored issues
–
show
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code. Further Reading: ![]() |
|||
53 | /* webpackChunkName: "bat-mode" */ |
||
54 | "brace/mode/batchfile" |
||
55 | ); |
||
56 | loaders["c_cpp"] = () => import( |
||
0 ignored issues
–
show
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
Generally using ECMAScript 6 specific syntax is fine if you are sure that it is already supported by all engines which are supposed to run this code. Further Reading: ![]() |
|||
57 | /* webpackChunkName: "h-mode" */ |
||
58 | "brace/mode/c_cpp" |
||
59 | ); |
||
60 | loaders["coffee"] = () => import |
||
0 ignored issues
–
show
There were too many errors found in this file; checking aborted after 34%.
If JSHint finds too many errors in a file, it aborts checking altogether because it suspects a configuration issue. Further Reading: ![]() |
|||
61 | /* webpackChunkName: "coffee-mode" */( |
||
62 | "brace/mode/coffee" |
||
63 | ); |
||
64 | loaders["cs"] = () => import( |
||
65 | /* webpackChunkName: "cs-mode" */ |
||
66 | "brace/mode/csharp" |
||
67 | ); |
||
68 | loaders["css"] = () => import( |
||
69 | /* webpackChunkName: "css-mode" */ |
||
70 | "brace/mode/css" |
||
71 | ); |
||
72 | loaders["groovy"] = () => import |
||
73 | /* webpackChunkName: "groovy-mode" */( |
||
74 | "brace/mode/groovy" |
||
75 | ); |
||
76 | loaders["html"] = () => import( |
||
77 | /* webpackChunkName: "html-mode" */ |
||
78 | "brace/mode/html" |
||
79 | ); |
||
80 | loaders["java"] = () => import( |
||
81 | /* webpackChunkName: "java-mode" */ |
||
82 | "brace/mode/java" |
||
83 | ); |
||
84 | loaders["javascript"] = () => import( |
||
85 | /* webpackChunkName: "js-mode" */ |
||
86 | "brace/mode/javascript" |
||
87 | ); |
||
88 | loaders["json"] = () => import( |
||
89 | /* webpackChunkName: "json-mode" */ |
||
90 | "brace/mode/json" |
||
91 | ); |
||
92 | loaders["latex"] = () => import( |
||
93 | /* webpackChunkName: "latex-mode" */ |
||
94 | "brace/mode/latex" |
||
95 | ); |
||
96 | loaders["less"] = () => import( |
||
97 | /* webpackChunkName: "less-mode" */ |
||
98 | "brace/mode/less" |
||
99 | ); |
||
100 | loaders["lua"] = () => import( |
||
101 | /* webpackChunkName: "lua-mode" */ |
||
102 | "brace/mode/lua" |
||
103 | ); |
||
104 | loaders["markdown"] = () => import( |
||
105 | /* webpackChunkName: "markdown-mode" */ |
||
106 | "brace/mode/markdown" |
||
107 | ); |
||
108 | loaders["ocaml"] = () => import( |
||
109 | /* webpackChunkName: "ml-mode" */ |
||
110 | "brace/mode/ocaml" |
||
111 | ); |
||
112 | loaders["perl"] = () => import( |
||
113 | /* webpackChunkName: "pl-mode" */ |
||
114 | "brace/mode/perl" |
||
115 | ); |
||
116 | loaders["php"] = () => import( |
||
117 | /* webpackChunkName: "php-mode" */ |
||
118 | "brace/mode/php" |
||
119 | ); |
||
120 | loaders["powershell"] = () => import( |
||
121 | /* webpackChunkName: "ps1-mode" */ |
||
122 | "brace/mode/powershell" |
||
123 | ); |
||
124 | loaders["python"] = () => import( |
||
125 | /* webpackChunkName: "py-mode" */ |
||
126 | "brace/mode/python" |
||
127 | ); |
||
128 | loaders["ruby"] = () => import( |
||
129 | /* webpackChunkName: "rb-mode" */ |
||
130 | "brace/mode/ruby" |
||
131 | ); |
||
132 | loaders["scad"] = () => import( |
||
133 | /* webpackChunkName: "scad-mode" */ |
||
134 | "brace/mode/scad" |
||
135 | ); // seems to be something like 3d model files printed with e.g. reprap |
||
136 | loaders["scala"] = () => import( |
||
137 | /* webpackChunkName: "scala-mode" */ |
||
138 | "brace/mode/scala" |
||
139 | ); |
||
140 | loaders["scss"] = () => import( |
||
141 | /* webpackChunkName: "scss-mode" */ |
||
142 | "brace/mode/scss"); // "sassy css" |
||
143 | loaders["sh"] = () => import( |
||
144 | /* webpackChunkName: "sh-mode" */ |
||
145 | "brace/mode/sh" |
||
146 | ); |
||
147 | loaders["sql"] = () => import( |
||
148 | /* webpackChunkName: "sql-mode" */ |
||
149 | "brace/mode/sql" |
||
150 | ); |
||
151 | loaders["svg"] = () => import( |
||
152 | /* webpackChunkName: "svg-mode" */ |
||
153 | "brace/mode/svg" |
||
154 | ); |
||
155 | loaders["textile"] = () => import( |
||
156 | /* webpackChunkName: "textile-mode" */ |
||
157 | "brace/mode/textile"); // related to markdown |
||
158 | loaders["xml"] = () => import( |
||
159 | /* webpackChunkName: "xml-mode" */ |
||
160 | "brace/mode/xml" |
||
161 | ); |
||
162 | |||
163 | export function getSyntaxMode (extension) { |
||
164 | const type = filetype[extension]; |
||
165 | if (type) { |
||
166 | // Then it must be in the array, so load the custom syntax mode |
||
167 | // Set the syntax mode |
||
168 | return loaders[type]().then(() => { |
||
169 | return type; |
||
170 | }); |
||
171 | } |
||
172 | |||
173 | return $.when(); |
||
174 | } |
||
175 |