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 | /** |
||
2 | * We'll load the axios HTTP library which allows us to easily issue requests |
||
3 | * to our Laravel back-end. This library automatically handles sending the |
||
4 | * CSRF token as a header based on the value of the "XSRF" token cookie. |
||
5 | */ |
||
6 | |||
7 | window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; |
||
8 | |||
9 | /** |
||
10 | * Sett global authorization headers for js libraries |
||
11 | */ |
||
12 | window.axios.defaults.headers.common['Authorization'] = "Bearer " + Laravel.apiToken; |
||
0 ignored issues
–
show
|
|||
13 | $.ajaxSetup({ |
||
14 | beforeSend: function (xhr) { |
||
15 | xhr.setRequestHeader("Authorization", "Bearer " + Laravel.apiToken); |
||
0 ignored issues
–
show
The variable
Laravel seems to be never declared. If this is a global, consider adding a /** global: Laravel */ comment.
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed. To learn more about declaring variables in Javascript, see the MDN. ![]() |
|||
16 | } |
||
17 | }); |
||
18 | kendo.jQuery.ajaxSetup({ |
||
0 ignored issues
–
show
The variable
kendo seems to be never declared. If this is a global, consider adding a /** global: kendo */ comment.
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed. To learn more about declaring variables in Javascript, see the MDN. ![]() |
|||
19 | beforeSend: function (xhr) { |
||
20 | xhr.setRequestHeader("Authorization", "Bearer " + Laravel.apiToken); |
||
0 ignored issues
–
show
The variable
Laravel seems to be never declared. If this is a global, consider adding a /** global: Laravel */ comment.
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed. To learn more about declaring variables in Javascript, see the MDN. ![]() |
|||
21 | } |
||
22 | }); |
||
23 | |||
24 | /** |
||
25 | * Next we will register the CSRF Token as a common header with Axios so that |
||
26 | * all outgoing HTTP requests automatically have it attached. This is just |
||
27 | * a simple convenience so we don't have to attach every token manually. |
||
28 | */ |
||
29 | |||
30 | let token = document.head.querySelector('meta[name="csrf-token"]'); |
||
31 | |||
32 | if (token) { |
||
33 | window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; |
||
34 | } else { |
||
35 | console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token'); |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * Echo exposes an expressive API for subscribing to channels and listening |
||
40 | * for events that are broadcast by Laravel. Echo and event broadcasting |
||
41 | * allows your team to easily build robust real-time web applications. |
||
42 | */ |
||
43 | |||
44 | // window.Echo = new Echo({ |
||
45 | // broadcaster: 'pusher', |
||
46 | // key: 'your-pusher-key' |
||
47 | // }); |
||
48 | |||
49 | // Material Buttons |
||
50 | $(() => { |
||
51 | window['mmex'] = window['mmex'] || {}; |
||
52 | window['mmex']['momentLocal'] = (date) => { |
||
53 | if (!date || _.isEmpty(date)) { |
||
0 ignored issues
–
show
The variable
_ seems to be never declared. If this is a global, consider adding a /** global: _ */ comment.
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed. To learn more about declaring variables in Javascript, see the MDN. ![]() |
|||
54 | return moment(); |
||
55 | } |
||
56 | |||
57 | let m = moment(date); |
||
58 | if (m.isValid()) { |
||
59 | return m; |
||
60 | } |
||
61 | m = moment(date, "DD.MM.YYYY"); |
||
62 | if (m.isValid()) { |
||
63 | return m; |
||
64 | } |
||
65 | |||
66 | throw new Error("No supported date format found for ", date); |
||
67 | }; |
||
68 | |||
69 | $.material.init(); |
||
70 | |||
71 | autosize($('textarea')); |
||
72 | |||
73 | $("[autofocus]").focus(); |
||
74 | |||
75 | $(".common-dateinput").each((index, elm) => { |
||
76 | let val = $(elm).val(); |
||
77 | let date = mmex.momentLocal(val).toDate(); |
||
0 ignored issues
–
show
The variable
mmex seems to be never declared. If this is a global, consider adding a /** global: mmex */ comment.
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed. To learn more about declaring variables in Javascript, see the MDN. ![]() |
|||
78 | console.log("set date ", date, " out of ", val); |
||
0 ignored issues
–
show
|
|||
79 | new kendo.ui.DateInput($(elm), { |
||
0 ignored issues
–
show
The variable
kendo seems to be never declared. If this is a global, consider adding a /** global: kendo */ comment.
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed. To learn more about declaring variables in Javascript, see the MDN. ![]() |
|||
80 | value: val ? date : new Date() |
||
81 | }); |
||
82 | }); |
||
83 | |||
84 | $(".common-datepicker").each((index, elm) => { |
||
85 | let val = $(elm).val(); |
||
86 | let date = mmex.momentLocal(val).toDate(); |
||
0 ignored issues
–
show
The variable
mmex seems to be never declared. If this is a global, consider adding a /** global: mmex */ comment.
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed. To learn more about declaring variables in Javascript, see the MDN. ![]() |
|||
87 | console.log("set date ", date, " out of ", val); |
||
0 ignored issues
–
show
|
|||
88 | new kendo.ui.DatePicker($(elm), { |
||
0 ignored issues
–
show
The variable
kendo seems to be never declared. If this is a global, consider adding a /** global: kendo */ comment.
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed. To learn more about declaring variables in Javascript, see the MDN. ![]() |
|||
89 | value: val ? date : new Date() |
||
90 | }); |
||
91 | }); |
||
92 | |||
93 | $(".common-dropdown-list").each((index, elm) => { |
||
94 | new kendo.ui.DropDownList($(elm), { |
||
0 ignored issues
–
show
The variable
kendo seems to be never declared. If this is a global, consider adding a /** global: kendo */ comment.
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed. To learn more about declaring variables in Javascript, see the MDN. ![]() |
|||
95 | filter: "startswith", |
||
96 | }); |
||
97 | }); |
||
98 | |||
99 | $('textarea, input').keyup(function (e) { |
||
100 | if (e.which == 17) isCtrl = false; |
||
0 ignored issues
–
show
Curly braces around statements make for more readable code and help prevent bugs when you add further statements.
Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later. Consider: if (a > 0)
b = 42;
If you or someone else later decides to put another statement in, only the first statement will be executed. if (a > 0)
console.log("a > 0");
b = 42;
In this case the statement if (a > 0) {
console.log("a > 0");
b = 42;
}
ensures that the proper code will be executed conditionally no matter how many statements are added or removed. ![]() |
|||
101 | }).keydown(function (e) { |
||
102 | if (e.which == 17) isCtrl = true; |
||
0 ignored issues
–
show
Curly braces around statements make for more readable code and help prevent bugs when you add further statements.
Consider adding curly braces around all statements when they are executed conditionally. This is optional if there is only one statement, but leaving them out can lead to unexpected behaviour if another statement is added later. Consider: if (a > 0)
b = 42;
If you or someone else later decides to put another statement in, only the first statement will be executed. if (a > 0)
console.log("a > 0");
b = 42;
In this case the statement if (a > 0) {
console.log("a > 0");
b = 42;
}
ensures that the proper code will be executed conditionally no matter how many statements are added or removed. ![]() |
|||
103 | if (e.which == 13 && isCtrl === true) { |
||
0 ignored issues
–
show
There is no return statement if
e.which == 13 && isCtrl === true is false . Are you sure this is correct? If so, consider adding return; explicitly.
This check looks for functions where a Consider this little piece of code function isBig(a) {
if (a > 5000) {
return "yes";
}
}
console.log(isBig(5001)); //returns yes
console.log(isBig(42)); //returns undefined
The function This behaviour may not be what you had intended. In any case, you can add a
![]() |
|||
104 | $(this).closest('form').submit(); |
||
105 | return false; |
||
106 | } |
||
107 | }); |
||
108 | }); |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.