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 | /*@global PodsI18n */ |
||
2 | (function ( $ ) { |
||
3 | var methods = { |
||
4 | prepare : function () { |
||
5 | var pods_ajaxurl = $( '#pods-wizard-box' ).data( 'url' ); |
||
6 | |||
7 | if ( 'undefined' != typeof pods_ajaxurl ) |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
8 | pods_ajaxurl = pods_ajaxurl.replace( /\?nojs\=1/, '?pods_ajax=1' ); |
||
0 ignored issues
–
show
|
|||
9 | |||
10 | if ( 'undefined' != typeof ajaxurl && ('undefined' == typeof pods_ajaxurl || '' == pods_ajaxurl || '?pods_ajax=1' == pods_ajaxurl || document.location.href == pods_ajaxurl || document.location.href.replace( /\?nojs\=1/, '?pods_ajax=1' ) == pods_ajaxurl) ) |
||
0 ignored issues
–
show
|
|||
11 | pods_ajaxurl = ajaxurl + '?pods_ajax=1'; |
||
0 ignored issues
–
show
|
|||
12 | |||
13 | if ( $( '#pods-wizard-panel-2 table tbody tr.pods-wizard-table-pending' )[ 0 ] ) { |
||
14 | var $row = $( '#pods-wizard-panel-2 table tbody tr.pods-wizard-table-pending' ).first(); |
||
15 | |||
16 | $row.removeClass( 'pods-wizard-table-pending' ).addClass( 'pods-wizard-table-active' ); |
||
17 | |||
18 | var postdata = { |
||
19 | 'action' : $( '#pods-wizard-box' ).data( 'action' ), |
||
20 | 'method' : $( '#pods-wizard-box' ).data( 'method' ), |
||
21 | '_wpnonce' : $( '#pods-wizard-box' ).data( '_wpnonce' ), |
||
22 | 'step' : 'prepare', |
||
23 | 'type' : $row.data( 'upgrade' ), |
||
24 | 'pod' : '', |
||
25 | 'version' : $( '#pods-wizard-box' ).data( 'version' ) |
||
26 | }; |
||
27 | |||
28 | if ( 'undefined' != typeof $row.data( 'pod' ) ) |
||
0 ignored issues
–
show
|
|||
29 | postdata[ 'pod' ] = $row.data( 'pod' ); |
||
0 ignored issues
–
show
|
|||
30 | |||
31 | $.ajax( { |
||
32 | type : 'POST', |
||
33 | url : pods_ajaxurl, |
||
34 | cache : false, |
||
35 | data : postdata, |
||
36 | success : function ( d ) { |
||
37 | if ( -1 == d.indexOf( '<e>' ) && -1 != d ) { |
||
0 ignored issues
–
show
|
|||
38 | $row.find( 'td.pods-wizard-count' ).text( d ); |
||
39 | $row.removeClass( 'pods-wizard-table-active' ).addClass( 'pods-wizard-table-complete' ); |
||
40 | |||
41 | if ( 'undefined' == typeof $row.data( 'pod' ) ) |
||
0 ignored issues
–
show
|
|||
42 | $( '#pods-wizard-panel-3 table tbody tr[data-upgrade="' + $row.data( 'upgrade' ) + '"] td.pods-wizard-count' ).text( d ); |
||
0 ignored issues
–
show
|
|||
43 | else |
||
44 | $( '#pods-wizard-panel-3 table tbody tr[data-pod="' + $row.data( 'pod' ) + '"] td.pods-wizard-count' ).text( d ); |
||
0 ignored issues
–
show
|
|||
45 | |||
46 | // Run next |
||
47 | return methods[ 'prepare' ](); |
||
0 ignored issues
–
show
|
|||
48 | } |
||
49 | else { |
||
50 | $row.removeClass( 'pods-wizard-table-active' ).addClass( 'pods-wizard-table-warning' ); |
||
51 | $row.find( 'td span.pods-wizard-info' ).html( d.replace( '<e>', '' ).replace( '</e>', '' ) ); |
||
52 | if ( window.console ) console.log( d.replace( '<e>', '' ).replace( '</e>', '' ) ); |
||
0 ignored issues
–
show
|
|||
53 | |||
54 | // Run next |
||
55 | return methods[ 'prepare' ](); |
||
0 ignored issues
–
show
|
|||
56 | } |
||
57 | }, |
||
58 | error : function () { |
||
59 | $row.removeClass( 'pods-wizard-table-active' ).addClass( 'pods-wizard-table-error' ); |
||
60 | $row.find( 'td span.pods-wizard-info' ).text( PodsI18n.__( 'Unable to process request, please try again.' ) ); |
||
61 | }, |
||
62 | dataType : 'html' |
||
63 | } ); |
||
64 | } |
||
65 | else { |
||
66 | $( '#pods-wizard-next' ).show(); |
||
67 | } |
||
68 | }, |
||
69 | migrate : function ( postdata, $row ) { |
||
70 | var pods_ajaxurl = $( '#pods-wizard-box' ).data( 'url' ); |
||
71 | |||
72 | if ( 'undefined' != typeof pods_ajaxurl ) |
||
0 ignored issues
–
show
|
|||
73 | pods_ajaxurl = pods_ajaxurl.replace( /\?nojs\=1/, '?pods_ajax=1' ); |
||
0 ignored issues
–
show
|
|||
74 | |||
75 | if ( 'undefined' != typeof ajaxurl && ('undefined' == typeof pods_ajaxurl || '' == pods_ajaxurl || '?pods_ajax=1' == pods_ajaxurl || document.location.href == pods_ajaxurl || document.location.href.replace( /\?nojs\=1/, '?pods_ajax=1' ) == pods_ajaxurl) ) |
||
0 ignored issues
–
show
|
|||
76 | pods_ajaxurl = ajaxurl + '?pods_ajax=1'; |
||
0 ignored issues
–
show
|
|||
77 | |||
78 | if ( 'undefined' != typeof postdata || $( '#pods-wizard-panel-3 table tbody tr.pods-wizard-table-pending' )[ 0 ] ) { |
||
0 ignored issues
–
show
|
|||
79 | if ( 'undefined' == typeof $row ) |
||
0 ignored issues
–
show
|
|||
80 | var $row = $( '#pods-wizard-panel-3 table tbody tr.pods-wizard-table-pending' ).first(); |
||
0 ignored issues
–
show
|
|||
81 | |||
82 | if ( 'undefined' == typeof postdata ) { |
||
0 ignored issues
–
show
|
|||
83 | $row.removeClass( 'pods-wizard-table-pending' ).addClass( 'pods-wizard-table-active' ); |
||
84 | |||
85 | var postdata = { |
||
0 ignored issues
–
show
|
|||
86 | 'action' : $( '#pods-wizard-box' ).data( 'action' ), |
||
87 | 'method' : $( '#pods-wizard-box' ).data( 'method' ), |
||
88 | '_wpnonce' : $( '#pods-wizard-box' ).data( '_wpnonce' ), |
||
89 | 'step' : 'migrate', |
||
90 | 'type' : $row.data( 'upgrade' ), |
||
91 | 'pod' : '', |
||
92 | 'version' : $( '#pods-wizard-box' ).data( 'version' ) |
||
93 | }; |
||
94 | |||
95 | if ( 'undefined' != typeof $row.data( 'pod' ) ) |
||
0 ignored issues
–
show
|
|||
96 | postdata[ 'pod' ] = $row.data( 'pod' ); |
||
0 ignored issues
–
show
|
|||
97 | } |
||
98 | |||
99 | $.ajax( { |
||
100 | type : 'POST', |
||
101 | url : pods_ajaxurl, |
||
102 | cache : false, |
||
103 | data : postdata, |
||
104 | success : function ( d ) { |
||
105 | if ( -1 == d.indexOf( '<e>' ) && '-1' != d ) { |
||
0 ignored issues
–
show
|
|||
106 | if ( '-2' == d ) { |
||
0 ignored issues
–
show
|
|||
107 | // Run next |
||
108 | return methods[ 'migrate' ]( postdata, $row ); |
||
0 ignored issues
–
show
|
|||
109 | } |
||
110 | else if ( '1' == d ) { |
||
0 ignored issues
–
show
|
|||
111 | $row.removeClass( 'pods-wizard-table-active' ).addClass( 'pods-wizard-table-complete' ); |
||
112 | |||
113 | // Run next |
||
114 | return methods[ 'migrate' ](); |
||
0 ignored issues
–
show
|
|||
115 | } |
||
116 | else if ( ( d.length - 2 ) == d.indexOf( '-2' ) ) { |
||
0 ignored issues
–
show
|
|||
117 | $row.removeClass( 'pods-wizard-table-active' ).addClass( 'pods-wizard-table-warning' ); |
||
118 | $row.find( 'td span.pods-wizard-info' ).html( d.replace( '<e>', '' ).replace( '</e>', '' ) ); |
||
119 | if ( window.console ) console.log( d.replace( '<e>', '' ).replace( '</e>', '' ) ); |
||
0 ignored issues
–
show
|
|||
120 | |||
121 | // Run next |
||
122 | return methods[ 'migrate' ]( postdata, $row ); |
||
0 ignored issues
–
show
|
|||
123 | } |
||
124 | else if ( ( d.length - 1 ) == d.indexOf( '1' ) ) { |
||
0 ignored issues
–
show
|
|||
125 | $row.removeClass( 'pods-wizard-table-active' ).addClass( 'pods-wizard-table-warning' ); |
||
126 | $row.find( 'td span.pods-wizard-info' ).html( d.replace( '<e>', '' ).replace( '</e>', '' ) ); |
||
127 | if ( window.console ) console.log( d.replace( '<e>', '' ).replace( '</e>', '' ) ); |
||
0 ignored issues
–
show
|
|||
128 | |||
129 | // Run next |
||
130 | return methods[ 'migrate' ](); |
||
0 ignored issues
–
show
There were too many errors found in this file; checking aborted after 75%.
If JSHint finds too many errors in a file, it aborts checking altogether because it suspects a configuration issue. Further Reading: ![]() |
|||
131 | } |
||
132 | else { |
||
133 | $row.removeClass( 'pods-wizard-table-active' ).addClass( 'pods-wizard-table-error' ); |
||
134 | $row.find( 'td span.pods-wizard-info' ).html( d.replace( '<e>', '' ).replace( '</e>', '' ) ); |
||
135 | if ( window.console ) console.log( d.replace( '<e>', '' ).replace( '</e>', '' ) ); |
||
136 | } |
||
137 | } |
||
138 | else if ( -1 < d.indexOf( 'Database Error;' ) ) { |
||
139 | $row.removeClass( 'pods-wizard-table-active' ).addClass( 'pods-wizard-table-error' ); |
||
140 | $row.find( 'td span.pods-wizard-info' ).html( d.replace( '<e>', '' ).replace( '</e>', '' ) ); |
||
141 | if ( window.console ) console.log( d.replace( '<e>', '' ).replace( '</e>', '' ) ); |
||
142 | } |
||
143 | else { |
||
144 | $row.removeClass( 'pods-wizard-table-active' ).addClass( 'pods-wizard-table-warning' ); |
||
145 | $row.find( 'td span.pods-wizard-info' ).html( d.replace( '<e>', '' ).replace( '</e>', '' ) ); |
||
146 | if ( window.console ) console.log( d.replace( '<e>', '' ).replace( '</e>', '' ) ); |
||
147 | |||
148 | // Run next |
||
149 | return methods[ 'migrate' ](); |
||
150 | } |
||
151 | }, |
||
152 | error : function () { |
||
153 | $row.removeClass( 'pods-wizard-table-active' ).addClass( 'pods-wizard-table-error' ); |
||
154 | $row.find( 'td span.pods-wizard-info' ).text( PodsI18n.__( 'Unable to process request, please try again.' ) ); |
||
155 | }, |
||
156 | dataType : 'html' |
||
157 | } ); |
||
158 | } |
||
159 | else { |
||
160 | $( '#pods-wizard-next' ).click().text( 'Start using Pods' ).addClass( 'finished' ); |
||
161 | $( '#pods-wizard-next' ).off( 'click' ); |
||
162 | $( '#pods-wizard-next' ).prop( 'href', 'admin.php?page=pods' ); |
||
163 | $( '#pods-wizard-next' ).show(); |
||
164 | $( '#pods-wizard-finished' ).show(); |
||
165 | } |
||
166 | } |
||
167 | }; |
||
168 | |||
169 | $.fn.PodsUpgrade = function ( method ) { |
||
170 | return methods[ method ](); |
||
171 | // go through tr by tr, run if/else checks |
||
172 | }; |
||
173 | })( jQuery ); |