Passed
Push — teampass_3.0 ( d39ab8...880668 )
by Nils
09:01 queued 04:32
created
pages/import.js.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,11 +43,11 @@
 block discarded – undo
43 43
 }
44 44
 
45 45
 /* do checks */
46
-require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php';
46
+require_once $SETTINGS['cpassman_dir'].'/sources/checks.php';
47 47
 if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'profile', $SETTINGS) === false) {
48 48
     $_SESSION['error']['code'] = ERR_NOT_ALLOWED;
49 49
     //not allowed page
50
-    include $SETTINGS['cpassman_dir'] . '/error.php';
50
+    include $SETTINGS['cpassman_dir'].'/error.php';
51 51
     exit;
52 52
 }
53 53
 ?>
Please login to merge, or discard this patch.
pages/options.js.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,11 +43,11 @@
 block discarded – undo
43 43
 }
44 44
 
45 45
 /* do checks */
46
-require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php';
46
+require_once $SETTINGS['cpassman_dir'].'/sources/checks.php';
47 47
 if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'profile', $SETTINGS) === false) {
48 48
     $_SESSION['error']['code'] = ERR_NOT_ALLOWED;
49 49
     //not allowed page
50
-    include $SETTINGS['cpassman_dir'] . '/error.php';
50
+    include $SETTINGS['cpassman_dir'].'/error.php';
51 51
     exit;
52 52
 }
53 53
 ?>
Please login to merge, or discard this patch.
pages/offline.js.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,11 +43,11 @@
 block discarded – undo
43 43
 }
44 44
 
45 45
 /* do checks */
46
-require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php';
46
+require_once $SETTINGS['cpassman_dir'].'/sources/checks.php';
47 47
 if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'profile', $SETTINGS) === false) {
48 48
     $_SESSION['error']['code'] = ERR_NOT_ALLOWED;
49 49
     //not allowed page
50
-    include $SETTINGS['cpassman_dir'] . '/error.php';
50
+    include $SETTINGS['cpassman_dir'].'/error.php';
51 51
     exit;
52 52
 }
53 53
 ?>
Please login to merge, or discard this patch.
pages/export.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,16 +43,16 @@
 block discarded – undo
43 43
 }
44 44
 
45 45
 /* do checks */
46
-require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php';
46
+require_once $SETTINGS['cpassman_dir'].'/sources/checks.php';
47 47
 if (checkUser($_SESSION['user_id'], $_SESSION['key'], curPage($SETTINGS), $SETTINGS) === false) {
48 48
     $_SESSION['error']['code'] = ERR_NOT_ALLOWED;
49 49
     //not allowed page
50
-    include $SETTINGS['cpassman_dir'] . '/error.php';
50
+    include $SETTINGS['cpassman_dir'].'/error.php';
51 51
     exit;
52 52
 }
53 53
 
54 54
 // Load
55
-require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
55
+require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
56 56
 
57 57
 ?>
58 58
 
Please login to merge, or discard this patch.
error.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
54 54
     && filter_input(INPUT_POST, 'session', FILTER_SANITIZE_STRING) === 'expired'
55 55
 ) {
56 56
     //Include files
57
-    require_once $SETTINGS['cpassman_dir'] . '/includes/config/settings.php';
58
-    require_once $SETTINGS['cpassman_dir'] . '/includes/config/include.php';
59
-    require_once $SETTINGS['cpassman_dir'] . '/sources/SplClassLoader.php';
60
-    require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
57
+    require_once $SETTINGS['cpassman_dir'].'/includes/config/settings.php';
58
+    require_once $SETTINGS['cpassman_dir'].'/includes/config/include.php';
59
+    require_once $SETTINGS['cpassman_dir'].'/sources/SplClassLoader.php';
60
+    require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
61 61
     // connect to DB
62
-    require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Database/Meekrodb/db.class.php';
62
+    require_once $SETTINGS['cpassman_dir'].'/includes/libraries/Database/Meekrodb/db.class.php';
63 63
     if (defined('DB_PASSWD_CLEAR') === false) {
64 64
         define('DB_PASSWD_CLEAR', defuseReturnDecrypted(DB_PASSWD, $SETTINGS));
65 65
     }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     // Update table by deleting ID
70 70
     if (isset($_SESSION['user_id'])) {
71 71
         DB::update(
72
-            DB_PREFIX . 'users',
72
+            DB_PREFIX.'users',
73 73
             [
74 74
                 'key_tempo' => '',
75 75
             ],
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         logEvents($SETTINGS, 'user_connection', 'disconnection', (string) $_SESSION['user_id'], $_SESSION['login']);
84 84
     }
85 85
 } else {
86
-    require_once $SETTINGS['cpassman_dir'] . '/sources/main.queries.php';
86
+    require_once $SETTINGS['cpassman_dir'].'/sources/main.queries.php';
87 87
     $errorCode = '';
88 88
     if (@$_SESSION['error']['code'] === ERR_NOT_ALLOWED) {
89 89
         $errorCode = 'ERROR NOT ALLOWED';
Please login to merge, or discard this patch.
pages/roles.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -43,15 +43,15 @@  discard block
 block discarded – undo
43 43
 }
44 44
 
45 45
 /* do checks */
46
-require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php';
46
+require_once $SETTINGS['cpassman_dir'].'/sources/checks.php';
47 47
 if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'roles', $SETTINGS) === false) {
48 48
     $_SESSION['error']['code'] = ERR_NOT_ALLOWED;
49
-    include $SETTINGS['cpassman_dir'] . '/error.php';
49
+    include $SETTINGS['cpassman_dir'].'/error.php';
50 50
     exit;
51 51
 }
52 52
 
53 53
 // Load template
54
-require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
54
+require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
55 55
 
56 56
 ?>
57 57
 
@@ -94,17 +94,17 @@  discard block
 block discarded – undo
94 94
                                 $arrUserRoles = array_filter($_SESSION['user_roles']);
95 95
                                 $where = '';
96 96
                                 if (count($arrUserRoles) > 0 && (int) $_SESSION['is_admin'] !== 1) {
97
-                                    $where = ' WHERE id IN (' . implode(',', $arrUserRoles) . ')';
97
+                                    $where = ' WHERE id IN ('.implode(',', $arrUserRoles).')';
98 98
                                 }
99
-                                $rows = DB::query('SELECT * FROM ' . prefixTable('roles_title') . $where);
99
+                                $rows = DB::query('SELECT * FROM '.prefixTable('roles_title').$where);
100 100
                                 foreach ($rows as $reccord) {
101 101
                                     echo '
102
-                                    <option value="' . $reccord['id'] . '"
103
-                                        data-complexity-text="' . addslashes(TP_PW_COMPLEXITY[$reccord['complexity']][1]) . '"
104
-                                        data-complexity-icon="' . TP_PW_COMPLEXITY[$reccord['complexity']][2] . '"
105
-                                        data-complexity="' . TP_PW_COMPLEXITY[$reccord['complexity']][0] . '"
106
-                                        data-allow-edit-all="' . $reccord['allow_pw_change'] . '">'.
107
-                                        $reccord['title'] . '</option>';
102
+                                    <option value="' . $reccord['id'].'"
103
+                                        data-complexity-text="' . addslashes(TP_PW_COMPLEXITY[$reccord['complexity']][1]).'"
104
+                                        data-complexity-icon="' . TP_PW_COMPLEXITY[$reccord['complexity']][2].'"
105
+                                        data-complexity="' . TP_PW_COMPLEXITY[$reccord['complexity']][0].'"
106
+                                        data-allow-edit-all="' . $reccord['allow_pw_change'].'">'.
107
+                                        $reccord['title'].'</option>';
108 108
                                 }
109 109
                                 ?>
110 110
                             </select>
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                                         <?php
126 126
                                         foreach (TP_PW_COMPLEXITY as $entry) {
127 127
                                             echo '
128
-                                        <option value="' . $entry[0] . '">' . addslashes($entry[1]) . '</option>';
128
+                                        <option value="' . $entry[0].'">'.addslashes($entry[1]).'</option>';
129 129
                                         }
130 130
                                         ?>
131 131
                                     </select>
Please login to merge, or discard this patch.
pages/2fa.js.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,11 +43,11 @@
 block discarded – undo
43 43
 }
44 44
 echo "ici";
45 45
 /* do checks */
46
-require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php';
46
+require_once $SETTINGS['cpassman_dir'].'/sources/checks.php';
47 47
 if (checkUser($_SESSION['user_id'], $_SESSION['key'], '2fa', $SETTINGS) === false) {
48 48
     $_SESSION['error']['code'] = ERR_NOT_ALLOWED;
49 49
     //not allowed page
50
-    include $SETTINGS['cpassman_dir'] . '/error.php';
50
+    include $SETTINGS['cpassman_dir'].'/error.php';
51 51
     exit;
52 52
 }
53 53
 ?>
Please login to merge, or discard this patch.
pages/2fa.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,15 +43,15 @@  discard block
 block discarded – undo
43 43
 }
44 44
 
45 45
 /* do checks */
46
-require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php';
46
+require_once $SETTINGS['cpassman_dir'].'/sources/checks.php';
47 47
 if (checkUser($_SESSION['user_id'], $_SESSION['key'], '2fa', $SETTINGS) === false) {
48 48
     $_SESSION['error']['code'] = ERR_NOT_ALLOWED;
49
-    include $SETTINGS['cpassman_dir'] . '/error.php';
49
+    include $SETTINGS['cpassman_dir'].'/error.php';
50 50
     exit;
51 51
 }
52 52
 
53 53
 // Load template
54
-require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
54
+require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
55 55
 
56 56
 ?>
57 57
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
                                     );
116 116
                                     foreach ($roles as $role) {
117 117
                                         echo '
118
-                                    <option value="' . $role['id'] . '"', in_array($role['id'], $arrRolesMFA) === true ? ' selected' : '', '>' . addslashes($role['title']) . '</option>';
118
+                                    <option value="' . $role['id'].'"', in_array($role['id'], $arrRolesMFA) === true ? ' selected' : '', '>'.addslashes($role['title']).'</option>';
119 119
                                     }
120 120
                                     ?>
121 121
                                 </select>
Please login to merge, or discard this patch.
pages/actions.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -43,15 +43,15 @@  discard block
 block discarded – undo
43 43
 }
44 44
 
45 45
 /* do checks */
46
-require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php';
46
+require_once $SETTINGS['cpassman_dir'].'/sources/checks.php';
47 47
 if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'ldap', $SETTINGS) === false) {
48 48
     $_SESSION['error']['code'] = ERR_NOT_ALLOWED;
49
-    include $SETTINGS['cpassman_dir'] . '/error.php';
49
+    include $SETTINGS['cpassman_dir'].'/error.php';
50 50
     exit;
51 51
 }
52 52
 
53 53
 // Load template
54
-require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php';
54
+require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php';
55 55
 
56 56
 ?>
57 57
 
@@ -90,14 +90,14 @@  discard block
 block discarded – undo
90 90
                                 <?php
91 91
                                 echo langHdl('rebuild_config_file');
92 92
 $data = DB::queryfirstrow(
93
-    'SELECT field_1, date FROM ' . prefixTable('log_system') . '
93
+    'SELECT field_1, date FROM '.prefixTable('log_system').'
94 94
                                     WHERE label = %s
95 95
                                     ORDER BY id DESC',
96 96
     'admin_action_rebuild_config_file'
97 97
 );
98 98
 if (DB::count() > 0) {
99
-    $tmp = langHdl('last_execution') . ' ' .
100
-                                        date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $data['date']);
99
+    $tmp = langHdl('last_execution').' '.
100
+                                        date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $data['date']);
101 101
     $tmp .= $data['field_1'] === 'success' ?
102 102
                                         '<i class="fas fa-check ml-2 text-success"></i>' : '<i class="fas fa-times ml-2 text-danger"></i>';
103 103
 } else {
@@ -119,14 +119,14 @@  discard block
 block discarded – undo
119 119
                                 </span>
120 120
                                 <?php echo langHdl('admin_action_check_pf');
121 121
 $data = DB::queryfirstrow(
122
-    'SELECT field_1, date FROM ' . prefixTable('log_system') . '
122
+    'SELECT field_1, date FROM '.prefixTable('log_system').'
123 123
                                     WHERE label = %s
124 124
                                     ORDER BY id DESC',
125 125
     'admin_action_check_pf'
126 126
 );
127 127
 if (DB::count() > 0) {
128
-    $tmp = langHdl('last_execution') . ' ' .
129
-                                        date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $data['date']);
128
+    $tmp = langHdl('last_execution').' '.
129
+                                        date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $data['date']);
130 130
     $tmp .= $data['field_1'] === 'success' ?
131 131
                                         '<i class="fas fa-check ml-2 text-success"></i>' : '<i class="fas fa-times ml-2 text-danger"></i>';
132 132
 } else {
@@ -146,14 +146,14 @@  discard block
 block discarded – undo
146 146
                                 </span>
147 147
                                 <?php echo langHdl('admin_action_db_clean_items');
148 148
 $data = DB::queryfirstrow(
149
-    'SELECT field_1, date FROM ' . prefixTable('log_system') . '
149
+    'SELECT field_1, date FROM '.prefixTable('log_system').'
150 150
                                     WHERE label = %s
151 151
                                     ORDER BY id DESC',
152 152
     'admin_action_db_clean_items'
153 153
 );
154 154
 if (DB::count() > 0) {
155
-    $tmp = langHdl('last_execution') . ' ' .
156
-                                        date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $data['date']);
155
+    $tmp = langHdl('last_execution').' '.
156
+                                        date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $data['date']);
157 157
     $tmp .= $data['field_1'] === 'success' ?
158 158
                                         '<i class="fas fa-check ml-2 text-success"></i>' : '<i class="fas fa-times ml-2 text-danger"></i>';
159 159
 } else {
@@ -175,14 +175,14 @@  discard block
 block discarded – undo
175 175
                                 </span>
176 176
                                 <?php echo langHdl('admin_action_db_optimize');
177 177
 $data = DB::queryfirstrow(
178
-    'SELECT field_1, date FROM ' . prefixTable('log_system') . '
178
+    'SELECT field_1, date FROM '.prefixTable('log_system').'
179 179
                                     WHERE label = %s
180 180
                                     ORDER BY id DESC',
181 181
     'admin_action_db_optimize'
182 182
 );
183 183
 if (DB::count() > 0) {
184
-    $tmp = langHdl('last_execution') . ' ' .
185
-                                        date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $data['date']);
184
+    $tmp = langHdl('last_execution').' '.
185
+                                        date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $data['date']);
186 186
     $tmp .= $data['field_1'] === 'success' ?
187 187
                                         '<i class="fas fa-check ml-2 text-success"></i>' : '<i class="fas fa-times ml-2 text-danger"></i>';
188 188
 } else {
@@ -201,14 +201,14 @@  discard block
 block discarded – undo
201 201
                                 </span>
202 202
                                 <?php echo langHdl('admin_action_purge_old_files');
203 203
 $data = DB::queryfirstrow(
204
-    'SELECT field_1, date FROM ' . prefixTable('log_system') . '
204
+    'SELECT field_1, date FROM '.prefixTable('log_system').'
205 205
                                     WHERE label = %s
206 206
                                     ORDER BY id DESC',
207 207
     'admin_action_purge_old_files'
208 208
 );
209 209
 if (DB::count() > 0) {
210
-    $tmp = langHdl('last_execution') . ' ' .
211
-                                        date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $data['date']);
210
+    $tmp = langHdl('last_execution').' '.
211
+                                        date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $data['date']);
212 212
     $tmp .= $data['field_1'] === 'success' ?
213 213
                                         '<i class="fas fa-check ml-2 text-success"></i>' : '<i class="fas fa-times ml-2 text-danger"></i>';
214 214
 } else {
@@ -230,14 +230,14 @@  discard block
 block discarded – undo
230 230
                                 </span>
231 231
                                 <?php echo langHdl('admin_action_reload_cache_table');
232 232
 $data = DB::queryfirstrow(
233
-    'SELECT field_1, date FROM ' . prefixTable('log_system') . '
233
+    'SELECT field_1, date FROM '.prefixTable('log_system').'
234 234
                                     WHERE label = %s
235 235
                                     ORDER BY id DESC',
236 236
     'admin_action_reload_cache_table'
237 237
 );
238 238
 if (DB::count() > 0) {
239
-    $tmp = langHdl('last_execution') . ' ' .
240
-                                        date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $data['date']);
239
+    $tmp = langHdl('last_execution').' '.
240
+                                        date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $data['date']);
241 241
     $tmp .= $data['field_1'] === 'success' ?
242 242
                                         '<i class="fas fa-check ml-2 text-success"></i>' : '<i class="fas fa-times ml-2 text-danger"></i>';
243 243
 } else {
@@ -260,14 +260,14 @@  discard block
 block discarded – undo
260 260
                                 </span>
261 261
                                 <?php echo langHdl('admin_action_change_salt_key');
262 262
 $data = DB::queryfirstrow(
263
-    'SELECT field_1, date FROM ' . prefixTable('log_system') . '
263
+    'SELECT field_1, date FROM '.prefixTable('log_system').'
264 264
                                     WHERE label = %s
265 265
                                     ORDER BY id DESC',
266 266
     'admin_action_change_sk'
267 267
 );
268 268
 if (DB::count() > 0) {
269
-    $tmp = langHdl('last_execution') . ' ' .
270
-                                        date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $data['date']);
269
+    $tmp = langHdl('last_execution').' '.
270
+                                        date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $data['date']);
271 271
     $tmp .= $data['field_1'] === 'success' ?
272 272
                                         '<i class="fas fa-check ml-2 text-success"></i>' : '<i class="fas fa-times ml-2 text-danger"></i>';
273 273
 } else {
@@ -290,14 +290,14 @@  discard block
 block discarded – undo
290 290
                                 </span>
291 291
                                 <?php echo langHdl('admin_action_attachments_cryption');
292 292
 $data = DB::queryfirstrow(
293
-    'SELECT field_1, date FROM ' . prefixTable('log_system') . '
293
+    'SELECT field_1, date FROM '.prefixTable('log_system').'
294 294
                                     WHERE label = %s
295 295
                                     ORDER BY id DESC',
296 296
     'admin_action_change_file_encryption'
297 297
 );
298 298
 if (DB::count() > 0) {
299
-    $tmp = langHdl('last_execution') . ' ' .
300
-                                        date($SETTINGS['date_format'] . ' ' . $SETTINGS['time_format'], (int) $data['date']);
299
+    $tmp = langHdl('last_execution').' '.
300
+                                        date($SETTINGS['date_format'].' '.$SETTINGS['time_format'], (int) $data['date']);
301 301
     $tmp .= $data['field_1'] === 'success' ?
302 302
                                         '<i class="fas fa-check ml-2 text-success"></i>' : '<i class="fas fa-times ml-2 text-danger"></i>';
303 303
 } else {
Please login to merge, or discard this patch.