@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | // error |
| 87 | 87 | toastr.remove(); |
| 88 | 88 | toastr.error( |
| 89 | - '<?php echo langHdl('server_answer_error') . '<br />' . langHdl('server_returned_data') . ':<br />'; ?>' + data.error, |
|
| 89 | + '<?php echo langHdl('server_answer_error').'<br />'.langHdl('server_returned_data').':<br />'; ?>' + data.error, |
|
| 90 | 90 | '', { |
| 91 | 91 | closeButton: true, |
| 92 | 92 | positionClass: 'toastr-top-right' |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | // error |
| 152 | 152 | toastr.remove(); |
| 153 | 153 | toastr.error( |
| 154 | - '<?php echo langHdl('server_answer_error') . '<br />' . langHdl('server_returned_data') . ':<br />'; ?>' + data.error, |
|
| 154 | + '<?php echo langHdl('server_answer_error').'<br />'.langHdl('server_returned_data').':<br />'; ?>' + data.error, |
|
| 155 | 155 | '', { |
| 156 | 156 | closeButton: true, |
| 157 | 157 | positionClass: 'toastr-top-right' |
@@ -35,10 +35,10 @@ |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /* do checks */ |
| 38 | -require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php'; |
|
| 38 | +require_once $SETTINGS['cpassman_dir'].'/sources/checks.php'; |
|
| 39 | 39 | if (checkUser($_SESSION['user_id'], $_SESSION['key'], '2fa', $SETTINGS) === false) { |
| 40 | 40 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; //not allowed page |
| 41 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 41 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 42 | 42 | exit(); |
| 43 | 43 | } |
| 44 | 44 | ?> |
@@ -35,15 +35,15 @@ |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | /* do checks */ |
| 38 | -require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php'; |
|
| 38 | +require_once $SETTINGS['cpassman_dir'].'/sources/checks.php'; |
|
| 39 | 39 | if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'ldap', $SETTINGS) === false) { |
| 40 | 40 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; |
| 41 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 41 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 42 | 42 | exit(); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | // Load template |
| 46 | -require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php'; |
|
| 46 | +require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php'; |
|
| 47 | 47 | |
| 48 | 48 | // LDAP type currently loaded |
| 49 | 49 | $ldap_type = isset($SETTINGS['ldap_type']) ? $SETTINGS['ldap_type'] : ''; |
@@ -55,16 +55,16 @@ discard block |
||
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /* do checks */ |
| 58 | -require_once $SETTINGS['cpassman_dir'] . '/includes/config/include.php'; |
|
| 59 | -require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php'; |
|
| 58 | +require_once $SETTINGS['cpassman_dir'].'/includes/config/include.php'; |
|
| 59 | +require_once $SETTINGS['cpassman_dir'].'/sources/checks.php'; |
|
| 60 | 60 | if (!checkUser($_SESSION['user_id'], $_SESSION['key'], 'items', $SETTINGS)) { |
| 61 | 61 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; //not allowed page |
| 62 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 62 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 63 | 63 | exit(); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | // load functions |
| 67 | -require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php'; |
|
| 67 | +require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php'; |
|
| 68 | 68 | |
| 69 | 69 | // Prepare POST variables |
| 70 | 70 | $post_user_token = filter_input(INPUT_POST, 'user_token', FILTER_SANITIZE_STRING); |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | } else { |
| 100 | 100 | // check if token is expired |
| 101 | 101 | $data = DB::queryFirstRow( |
| 102 | - 'SELECT end_timestamp FROM ' . prefixTable('tokens') . ' WHERE user_id = %i AND token = %s', |
|
| 102 | + 'SELECT end_timestamp FROM '.prefixTable('tokens').' WHERE user_id = %i AND token = %s', |
|
| 103 | 103 | $_SESSION['user_id'], |
| 104 | 104 | $post_user_token |
| 105 | 105 | ); |
@@ -121,12 +121,12 @@ discard block |
||
| 121 | 121 | |
| 122 | 122 | // HTTP headers for no cache etc |
| 123 | 123 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); |
| 124 | -header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); |
|
| 124 | +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); |
|
| 125 | 125 | header('Cache-Control: no-store, no-cache, must-revalidate'); |
| 126 | 126 | header('Cache-Control: post-check=0, pre-check=0', false); |
| 127 | 127 | |
| 128 | 128 | if (null !== $post_type_upload && $post_type_upload === 'upload_profile_photo') { |
| 129 | - $targetDir = $SETTINGS['cpassman_dir'] . '/includes/avatars'; |
|
| 129 | + $targetDir = $SETTINGS['cpassman_dir'].'/includes/avatars'; |
|
| 130 | 130 | } else { |
| 131 | 131 | $targetDir = $SETTINGS['path_to_files_folder']; |
| 132 | 132 | } |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | |
| 181 | 181 | // Validate file name (for our purposes we'll just remove invalid characters) |
| 182 | 182 | $file_name = preg_replace( |
| 183 | - '/[^' . $valid_chars_regex . '\.]/', |
|
| 183 | + '/[^'.$valid_chars_regex.'\.]/', |
|
| 184 | 184 | '', |
| 185 | 185 | filter_var( |
| 186 | 186 | strtolower(basename($_FILES['file']['name'])), |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | ) |
| 189 | 189 | ); |
| 190 | 190 | if (strlen($file_name) == 0 || strlen($file_name) > $MAX_FILENAME_LENGTH) { |
| 191 | - handleUploadError('Invalid file name: ' . $file_name . '.'); |
|
| 191 | + handleUploadError('Invalid file name: '.$file_name.'.'); |
|
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | // Validate file extension |
@@ -202,8 +202,8 @@ discard block |
||
| 202 | 202 | $ext, |
| 203 | 203 | explode( |
| 204 | 204 | ',', |
| 205 | - $SETTINGS['upload_docext'] . ',' . $SETTINGS['upload_imagesext'] . |
|
| 206 | - ',' . $SETTINGS['upload_pkgext'] . ',' . $SETTINGS['upload_otherext'] |
|
| 205 | + $SETTINGS['upload_docext'].','.$SETTINGS['upload_imagesext']. |
|
| 206 | + ','.$SETTINGS['upload_pkgext'].','.$SETTINGS['upload_otherext'] |
|
| 207 | 207 | ) |
| 208 | 208 | ) === false |
| 209 | 209 | ) { |
@@ -212,27 +212,27 @@ discard block |
||
| 212 | 212 | |
| 213 | 213 | // is destination folder writable |
| 214 | 214 | if (is_writable($SETTINGS['path_to_files_folder']) === false) { |
| 215 | - handleUploadError('Not enough permissions on folder ' . $SETTINGS['path_to_files_folder'] . '.'); |
|
| 215 | + handleUploadError('Not enough permissions on folder '.$SETTINGS['path_to_files_folder'].'.'); |
|
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | // Clean the fileName for security reasons |
| 219 | 219 | $fileName = preg_replace('/[^\w\.]+/', '_', $fileName); |
| 220 | -$fileName = preg_replace('/[^' . $valid_chars_regex . '\.]/', '', strtolower(basename($fileName))); |
|
| 220 | +$fileName = preg_replace('/[^'.$valid_chars_regex.'\.]/', '', strtolower(basename($fileName))); |
|
| 221 | 221 | |
| 222 | 222 | // Make sure the fileName is unique but only if chunking is disabled |
| 223 | -if ($chunks < 2 && file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName)) { |
|
| 223 | +if ($chunks < 2 && file_exists($targetDir.DIRECTORY_SEPARATOR.$fileName)) { |
|
| 224 | 224 | $fileNameA = substr($fileName, 0, strlen($ext)); |
| 225 | 225 | $fileNameB = substr($fileName, strlen($ext)); |
| 226 | 226 | |
| 227 | 227 | $count = 1; |
| 228 | - while (file_exists($targetDir . DIRECTORY_SEPARATOR . $fileNameA . '_' . $count . $fileNameB)) { |
|
| 228 | + while (file_exists($targetDir.DIRECTORY_SEPARATOR.$fileNameA.'_'.$count.$fileNameB)) { |
|
| 229 | 229 | ++$count; |
| 230 | 230 | } |
| 231 | 231 | |
| 232 | - $fileName = $fileNameA . '_' . $count . $fileNameB; |
|
| 232 | + $fileName = $fileNameA.'_'.$count.$fileNameB; |
|
| 233 | 233 | } |
| 234 | 234 | |
| 235 | -$filePath = $targetDir . DIRECTORY_SEPARATOR . $fileName; |
|
| 235 | +$filePath = $targetDir.DIRECTORY_SEPARATOR.$fileName; |
|
| 236 | 236 | |
| 237 | 237 | // Create target dir |
| 238 | 238 | if (!file_exists($targetDir)) { |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | // Remove old temp files |
| 247 | 247 | if ($cleanupTargetDir && is_dir($targetDir) && ($dir = opendir($targetDir))) { |
| 248 | 248 | while (($file = readdir($dir)) !== false) { |
| 249 | - $tmpfilePath = $targetDir . DIRECTORY_SEPARATOR . $file; |
|
| 249 | + $tmpfilePath = $targetDir.DIRECTORY_SEPARATOR.$file; |
|
| 250 | 250 | |
| 251 | 251 | // Remove temp file if it is older than the max age and is not the current file |
| 252 | 252 | if ( |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | $newFileName = bin2hex(GenerateCryptKey(16, false, true, true, false, true, $SETTINGS)); |
| 337 | 337 | |
| 338 | 338 | //Connect to mysql server |
| 339 | -require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Database/Meekrodb/db.class.php'; |
|
| 339 | +require_once $SETTINGS['cpassman_dir'].'/includes/libraries/Database/Meekrodb/db.class.php'; |
|
| 340 | 340 | DB::$host = DB_HOST; |
| 341 | 341 | DB::$user = DB_USER; |
| 342 | 342 | DB::$password = defuseReturnDecrypted(DB_PASSWD, $SETTINGS); |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | ) { |
| 353 | 353 | rename( |
| 354 | 354 | $filePath, |
| 355 | - $targetDir . DIRECTORY_SEPARATOR . $newFileName |
|
| 355 | + $targetDir.DIRECTORY_SEPARATOR.$newFileName |
|
| 356 | 356 | ); |
| 357 | 357 | |
| 358 | 358 | // Add in DB |
@@ -380,7 +380,7 @@ discard block |
||
| 380 | 380 | ) { |
| 381 | 381 | rename( |
| 382 | 382 | $filePath, |
| 383 | - $targetDir . DIRECTORY_SEPARATOR . $newFileName |
|
| 383 | + $targetDir.DIRECTORY_SEPARATOR.$newFileName |
|
| 384 | 384 | ); |
| 385 | 385 | |
| 386 | 386 | // Add in DB |
@@ -412,13 +412,13 @@ discard block |
||
| 412 | 412 | // rename the file |
| 413 | 413 | rename( |
| 414 | 414 | $filePath, |
| 415 | - $targetDir . DIRECTORY_SEPARATOR . $newFileName . '.' . $ext |
|
| 415 | + $targetDir.DIRECTORY_SEPARATOR.$newFileName.'.'.$ext |
|
| 416 | 416 | ); |
| 417 | 417 | |
| 418 | 418 | // make thumbnail |
| 419 | 419 | $ret = makeThumbnail( |
| 420 | - $targetDir . DIRECTORY_SEPARATOR . $newFileName . '.' . $ext, |
|
| 421 | - $targetDir . DIRECTORY_SEPARATOR . $newFileName . '_thumb' . '.' . $ext, |
|
| 420 | + $targetDir.DIRECTORY_SEPARATOR.$newFileName.'.'.$ext, |
|
| 421 | + $targetDir.DIRECTORY_SEPARATOR.$newFileName.'_thumb'.'.'.$ext, |
|
| 422 | 422 | 40 |
| 423 | 423 | ); |
| 424 | 424 | |
@@ -429,21 +429,21 @@ discard block |
||
| 429 | 429 | } |
| 430 | 430 | |
| 431 | 431 | // get current avatar and delete it |
| 432 | - $data = DB::queryFirstRow('SELECT avatar, avatar_thumb FROM ' . prefixTable('users') . ' WHERE id=%i', $_SESSION['user_id']); |
|
| 433 | - fileDelete($targetDir . DIRECTORY_SEPARATOR . $data['avatar'], $SETTINGS); |
|
| 434 | - fileDelete($targetDir . DIRECTORY_SEPARATOR . $data['avatar_thumb'], $SETTINGS); |
|
| 432 | + $data = DB::queryFirstRow('SELECT avatar, avatar_thumb FROM '.prefixTable('users').' WHERE id=%i', $_SESSION['user_id']); |
|
| 433 | + fileDelete($targetDir.DIRECTORY_SEPARATOR.$data['avatar'], $SETTINGS); |
|
| 434 | + fileDelete($targetDir.DIRECTORY_SEPARATOR.$data['avatar_thumb'], $SETTINGS); |
|
| 435 | 435 | |
| 436 | 436 | // store in DB the new avatar |
| 437 | 437 | DB::query( |
| 438 | - 'UPDATE ' . prefixTable('users') . " |
|
| 439 | - SET avatar='" . $newFileName . '.' . $ext . "', avatar_thumb='" . $newFileName . '_thumb' . '.' . $ext . "' |
|
| 438 | + 'UPDATE '.prefixTable('users')." |
|
| 439 | + SET avatar='" . $newFileName.'.'.$ext."', avatar_thumb='".$newFileName.'_thumb'.'.'.$ext."' |
|
| 440 | 440 | WHERE id=%i", |
| 441 | 441 | $_SESSION['user_id'] |
| 442 | 442 | ); |
| 443 | 443 | |
| 444 | 444 | // store in session |
| 445 | - $_SESSION['user_avatar'] = $newFileName . '.' . $ext; |
|
| 446 | - $_SESSION['user_avatar_thumb'] = $newFileName . '_thumb' . '.' . $ext; |
|
| 445 | + $_SESSION['user_avatar'] = $newFileName.'.'.$ext; |
|
| 446 | + $_SESSION['user_avatar_thumb'] = $newFileName.'_thumb'.'.'.$ext; |
|
| 447 | 447 | |
| 448 | 448 | // return info |
| 449 | 449 | echo prepareExchangedData( |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | ) { |
| 462 | 462 | rename( |
| 463 | 463 | $filePath, |
| 464 | - $targetDir . DIRECTORY_SEPARATOR . $newFileName |
|
| 464 | + $targetDir.DIRECTORY_SEPARATOR.$newFileName |
|
| 465 | 465 | ); |
| 466 | 466 | |
| 467 | 467 | // Add in DB |
@@ -39,11 +39,11 @@ discard block |
||
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | /* do checks */ |
| 42 | -require_once $SETTINGS['cpassman_dir'] . '/includes/config/include.php'; |
|
| 43 | -require_once $SETTINGS['cpassman_dir'] . '/sources/checks.php'; |
|
| 42 | +require_once $SETTINGS['cpassman_dir'].'/includes/config/include.php'; |
|
| 43 | +require_once $SETTINGS['cpassman_dir'].'/sources/checks.php'; |
|
| 44 | 44 | if (checkUser($_SESSION['user_id'], $_SESSION['key'], 'items', $SETTINGS) !== true) { |
| 45 | 45 | $_SESSION['error']['code'] = ERR_NOT_ALLOWED; //not allowed page |
| 46 | - include $SETTINGS['cpassman_dir'] . '/error.php'; |
|
| 46 | + include $SETTINGS['cpassman_dir'].'/error.php'; |
|
| 47 | 47 | exit(); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $post_isPersonal = filter_input(INPUT_POST, 'isPersonal', FILTER_SANITIZE_NUMBER_INT); |
| 70 | 70 | |
| 71 | 71 | // load functions |
| 72 | -require_once $SETTINGS['cpassman_dir'] . '/sources/main.functions.php'; |
|
| 72 | +require_once $SETTINGS['cpassman_dir'].'/sources/main.functions.php'; |
|
| 73 | 73 | |
| 74 | 74 | // Get parameters |
| 75 | 75 | $chunk = isset($_REQUEST['chunk']) ? (int) $_REQUEST['chunk'] : 0; |
@@ -82,8 +82,8 @@ discard block |
||
| 82 | 82 | exit(); |
| 83 | 83 | } else { |
| 84 | 84 | //Connect to mysql server |
| 85 | - include_once $SETTINGS['cpassman_dir'] . '/includes/config/settings.php'; |
|
| 86 | - include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Database/Meekrodb/db.class.php'; |
|
| 85 | + include_once $SETTINGS['cpassman_dir'].'/includes/config/settings.php'; |
|
| 86 | + include_once $SETTINGS['cpassman_dir'].'/includes/libraries/Database/Meekrodb/db.class.php'; |
|
| 87 | 87 | if (defined('DB_PASSWD_CLEAR') === false) { |
| 88 | 88 | define('DB_PASSWD_CLEAR', defuseReturnDecrypted(DB_PASSWD, $SETTINGS)); |
| 89 | 89 | } |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | // check if token is expired |
| 144 | 144 | $data = DB::queryFirstRow( |
| 145 | 145 | 'SELECT end_timestamp |
| 146 | - FROM ' . prefixTable('tokens') . ' |
|
| 146 | + FROM ' . prefixTable('tokens').' |
|
| 147 | 147 | WHERE user_id = %i AND token = %s', |
| 148 | 148 | $_SESSION['user_id'], |
| 149 | 149 | $post_user_token |
@@ -168,12 +168,12 @@ discard block |
||
| 168 | 168 | } |
| 169 | 169 | |
| 170 | 170 | // Load Settings |
| 171 | - include_once $SETTINGS['cpassman_dir'] . '/includes/config/tp.config.php'; |
|
| 171 | + include_once $SETTINGS['cpassman_dir'].'/includes/config/tp.config.php'; |
|
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | // HTTP headers for no cache etc |
| 175 | 175 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); |
| 176 | -header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); |
|
| 176 | +header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); |
|
| 177 | 177 | header('Cache-Control: no-store, no-cache, must-revalidate'); |
| 178 | 178 | header('Cache-Control: post-check=0, pre-check=0', false); |
| 179 | 179 | |
@@ -218,9 +218,9 @@ discard block |
||
| 218 | 218 | } |
| 219 | 219 | |
| 220 | 220 | // Validate file name (for our purposes we'll just remove invalid characters) |
| 221 | -$file_name = preg_replace('[^' . $valid_chars_regex . ']', '', strtolower(basename($_FILES['file']['name']))); |
|
| 221 | +$file_name = preg_replace('[^'.$valid_chars_regex.']', '', strtolower(basename($_FILES['file']['name']))); |
|
| 222 | 222 | if (strlen($file_name) == 0 || strlen($file_name) > $MAX_FILENAME_LENGTH) { |
| 223 | - handleAttachmentError('Invalid file name: ' . $file_name . '.', 114); |
|
| 223 | + handleAttachmentError('Invalid file name: '.$file_name.'.', 114); |
|
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | // Validate file extension |
@@ -230,8 +230,8 @@ discard block |
||
| 230 | 230 | $ext, |
| 231 | 231 | explode( |
| 232 | 232 | ',', |
| 233 | - $SETTINGS['upload_docext'] . ',' . $SETTINGS['upload_imagesext'] . |
|
| 234 | - ',' . $SETTINGS['upload_pkgext'] . ',' . $SETTINGS['upload_otherext'] |
|
| 233 | + $SETTINGS['upload_docext'].','.$SETTINGS['upload_imagesext']. |
|
| 234 | + ','.$SETTINGS['upload_pkgext'].','.$SETTINGS['upload_otherext'] |
|
| 235 | 235 | ) |
| 236 | 236 | ) === false |
| 237 | 237 | ) { |
@@ -243,24 +243,24 @@ discard block |
||
| 243 | 243 | |
| 244 | 244 | // Clean the fileName for security reasons |
| 245 | 245 | $fileInfo = pathinfo($fileName); |
| 246 | -$fileName = base64_encode($fileInfo['filename']) . '.' . $fileInfo['extension']; |
|
| 246 | +$fileName = base64_encode($fileInfo['filename']).'.'.$fileInfo['extension']; |
|
| 247 | 247 | $fileFullSize = 0; |
| 248 | 248 | |
| 249 | 249 | // Make sure the fileName is unique but only if chunking is disabled |
| 250 | -if ($chunks < 2 && file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName)) { |
|
| 250 | +if ($chunks < 2 && file_exists($targetDir.DIRECTORY_SEPARATOR.$fileName)) { |
|
| 251 | 251 | $ext = strrpos($fileName, '.'); |
| 252 | 252 | $fileNameA = substr($fileName, 0, $ext); |
| 253 | 253 | $fileNameB = substr($fileName, $ext); |
| 254 | 254 | |
| 255 | 255 | $count = 1; |
| 256 | - while (file_exists($targetDir . DIRECTORY_SEPARATOR . $fileNameA . '_' . $count . $fileNameB)) { |
|
| 256 | + while (file_exists($targetDir.DIRECTORY_SEPARATOR.$fileNameA.'_'.$count.$fileNameB)) { |
|
| 257 | 257 | ++$count; |
| 258 | 258 | } |
| 259 | 259 | |
| 260 | - $fileName = $fileNameA . '_' . $count . $fileNameB; |
|
| 260 | + $fileName = $fileNameA.'_'.$count.$fileNameB; |
|
| 261 | 261 | } |
| 262 | 262 | |
| 263 | -$filePath = $targetDir . DIRECTORY_SEPARATOR . $fileName; |
|
| 263 | +$filePath = $targetDir.DIRECTORY_SEPARATOR.$fileName; |
|
| 264 | 264 | |
| 265 | 265 | // Create target dir |
| 266 | 266 | if (file_exists($targetDir) === false) { |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | // Remove old temp files |
| 275 | 275 | if ($cleanupTargetDir && is_dir($targetDir) && ($dir = opendir($targetDir))) { |
| 276 | 276 | while (($file = readdir($dir)) !== false) { |
| 277 | - $tmpfilePath = $targetDir . DIRECTORY_SEPARATOR . $file; |
|
| 277 | + $tmpfilePath = $targetDir.DIRECTORY_SEPARATOR.$file; |
|
| 278 | 278 | |
| 279 | 279 | // Remove temp file if it is older than the max age and is not the current file |
| 280 | 280 | if ( |
@@ -396,8 +396,8 @@ discard block |
||
| 396 | 396 | // This is a public object |
| 397 | 397 | $users = DB::query( |
| 398 | 398 | 'SELECT id, public_key |
| 399 | - FROM ' . prefixTable('users') . ' |
|
| 400 | - WHERE id NOT IN ("' . OTV_USER_ID . '","' . SSH_USER_ID . '","' . API_USER_ID . '") |
|
| 399 | + FROM ' . prefixTable('users').' |
|
| 400 | + WHERE id NOT IN ("' . OTV_USER_ID.'","'.SSH_USER_ID.'","'.API_USER_ID.'") |
|
| 401 | 401 | AND public_key != ""' |
| 402 | 402 | ); |
| 403 | 403 | foreach ($users as $user) { |
@@ -435,14 +435,14 @@ discard block |
||
| 435 | 435 | 'date' => time(), |
| 436 | 436 | 'id_user' => $_SESSION['user_id'], |
| 437 | 437 | 'action' => 'at_modification', |
| 438 | - 'raison' => 'at_add_file : ' . $fileName . ':' . $newID, |
|
| 438 | + 'raison' => 'at_add_file : '.$fileName.':'.$newID, |
|
| 439 | 439 | ) |
| 440 | 440 | ); |
| 441 | 441 | } |
| 442 | 442 | } |
| 443 | 443 | |
| 444 | 444 | // Return JSON-RPC response |
| 445 | -die('{"jsonrpc" : "2.0", "result" : null, "id" : "' . $newID . '"}'); |
|
| 445 | +die('{"jsonrpc" : "2.0", "result" : null, "id" : "'.$newID.'"}'); |
|
| 446 | 446 | |
| 447 | 447 | /** |
| 448 | 448 | * Undocumented function. |
@@ -452,5 +452,5 @@ discard block |
||
| 452 | 452 | */ |
| 453 | 453 | function handleAttachmentError($message, $code) |
| 454 | 454 | { |
| 455 | - echo '{"jsonrpc" : "2.0", "error" : {"code": ' . htmlentities($code, ENT_QUOTES) . ', "message": "' . htmlentities($message, ENT_QUOTES) . '"}, "id" : "id"}'; |
|
| 455 | + echo '{"jsonrpc" : "2.0", "error" : {"code": '.htmlentities($code, ENT_QUOTES).', "message": "'.htmlentities($message, ENT_QUOTES).'"}, "id" : "id"}'; |
|
| 456 | 456 | } |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | throw new Exception('Error file "/includes/config/tp.config.php" not exists', 1); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | -require_once $SETTINGS['cpassman_dir'] . '/includes/config/include.php'; |
|
| 34 | +require_once $SETTINGS['cpassman_dir'].'/includes/config/include.php'; |
|
| 35 | 35 | |
| 36 | 36 | /* |
| 37 | 37 | Handle CASES |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | $csrfp_array = include '../includes/libraries/csrfp/libs/csrfp.config.php'; |
| 52 | 52 | |
| 53 | 53 | // Send back CSRFP info |
| 54 | - echo $csrfp_array['CSRFP_TOKEN'] . ';' . filter_input(INPUT_POST, $csrfp_array['CSRFP_TOKEN'], FILTER_SANITIZE_STRING); |
|
| 54 | + echo $csrfp_array['CSRFP_TOKEN'].';'.filter_input(INPUT_POST, $csrfp_array['CSRFP_TOKEN'], FILTER_SANITIZE_STRING); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | break; |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | function curPage($SETTINGS) |
| 66 | 66 | { |
| 67 | 67 | // Load libraries |
| 68 | - include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/protect/SuperGlobal/SuperGlobal.php'; |
|
| 68 | + include_once $SETTINGS['cpassman_dir'].'/includes/libraries/protect/SuperGlobal/SuperGlobal.php'; |
|
| 69 | 69 | $superGlobal = new protect\SuperGlobal\SuperGlobal(); |
| 70 | 70 | |
| 71 | 71 | // Parse the url |
@@ -125,11 +125,11 @@ discard block |
||
| 125 | 125 | $pageVisited = array($pageVisited); |
| 126 | 126 | |
| 127 | 127 | // Load |
| 128 | - include_once $SETTINGS['cpassman_dir'] . '/includes/config/include.php'; |
|
| 129 | - include_once $SETTINGS['cpassman_dir'] . '/includes/config/settings.php'; |
|
| 128 | + include_once $SETTINGS['cpassman_dir'].'/includes/config/include.php'; |
|
| 129 | + include_once $SETTINGS['cpassman_dir'].'/includes/config/settings.php'; |
|
| 130 | 130 | |
| 131 | 131 | // Load libraries |
| 132 | - include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/protect/SuperGlobal/SuperGlobal.php'; |
|
| 132 | + include_once $SETTINGS['cpassman_dir'].'/includes/libraries/protect/SuperGlobal/SuperGlobal.php'; |
|
| 133 | 133 | $superGlobal = new protect\SuperGlobal\SuperGlobal(); |
| 134 | 134 | |
| 135 | 135 | // Securize language |
@@ -140,12 +140,12 @@ discard block |
||
| 140 | 140 | $superGlobal->put('user_language', 'english', 'SESSION'); |
| 141 | 141 | } |
| 142 | 142 | |
| 143 | - include_once $SETTINGS['cpassman_dir'] . '/includes/language/' . $superGlobal->get('user_language', 'SESSION') . '.php'; |
|
| 143 | + include_once $SETTINGS['cpassman_dir'].'/includes/language/'.$superGlobal->get('user_language', 'SESSION').'.php'; |
|
| 144 | 144 | include_once 'SplClassLoader.php'; |
| 145 | 145 | include_once 'main.functions.php'; |
| 146 | 146 | |
| 147 | 147 | // Connect to mysql server |
| 148 | - include_once $SETTINGS['cpassman_dir'] . '/includes/libraries/Database/Meekrodb/db.class.php'; |
|
| 148 | + include_once $SETTINGS['cpassman_dir'].'/includes/libraries/Database/Meekrodb/db.class.php'; |
|
| 149 | 149 | if (defined('DB_PASSWD_CLEAR') === false) { |
| 150 | 150 | define('DB_PASSWD_CLEAR', defuseReturnDecrypted(DB_PASSWD, $SETTINGS)); |
| 151 | 151 | } |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | |
| 159 | 159 | // load user's data |
| 160 | 160 | $data = DB::queryfirstrow( |
| 161 | - 'SELECT login, key_tempo, admin, gestionnaire, can_manage_all_users FROM ' . prefixTable('users') . ' WHERE id = %i', |
|
| 161 | + 'SELECT login, key_tempo, admin, gestionnaire, can_manage_all_users FROM '.prefixTable('users').' WHERE id = %i', |
|
| 162 | 162 | $userId |
| 163 | 163 | ); |
| 164 | 164 | |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | } else { |
| 49 | 49 | throw new Exception("Error file '/includes/config/tp.config.php' not exists", 1); |
| 50 | 50 | } |
| 51 | -require_once $SETTINGS['cpassman_dir'] . '/includes/libraries/protect/SuperGlobal/SuperGlobal.php'; |
|
| 51 | +require_once $SETTINGS['cpassman_dir'].'/includes/libraries/protect/SuperGlobal/SuperGlobal.php'; |
|
| 52 | 52 | $superGlobal = new protect\SuperGlobal\SuperGlobal(); |
| 53 | 53 | ?> |
| 54 | 54 | <body class="hold-transition otv-page"> |
@@ -48,13 +48,13 @@ discard block |
||
| 48 | 48 | <div class="login-logo">', |
| 49 | 49 | isset($SETTINGS['custom_logo']) === true |
| 50 | 50 | && empty($SETTINGS['custom_logo']) === false ? |
| 51 | - '<img src="' . (string) $SETTINGS['custom_logo'] . '" alt="" style="text-align:center;" />' : '', |
|
| 51 | + '<img src="'.(string) $SETTINGS['custom_logo'].'" alt="" style="text-align:center;" />' : '', |
|
| 52 | 52 | ' |
| 53 | 53 | <div style="margin-top:20px;"> |
| 54 | 54 | <img src="includes/images/teampass-logo2-login.png" alt="Teampass Logo"> |
| 55 | 55 | </div> |
| 56 | 56 | <div style="font-weight:bold;"> |
| 57 | - ' . TP_TOOL_NAME . ' |
|
| 57 | + ' . TP_TOOL_NAME.' |
|
| 58 | 58 | </div> |
| 59 | 59 | </div> |
| 60 | 60 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | isset($SETTINGS['enable_http_request_login']) === true |
| 78 | 78 | && (int) $SETTINGS['enable_http_request_login'] === 1 |
| 79 | 79 | && $superGlobal('PHP_AUTH_USER', 'SERVER') !== null |
| 80 | - && ! (isset($SETTINGS['maintenance_mode']) === true |
|
| 80 | + && !(isset($SETTINGS['maintenance_mode']) === true |
|
| 81 | 81 | && (int) $SETTINGS['maintenance_mode'] === 1) |
| 82 | 82 | ) { |
| 83 | 83 | if (strpos($superGlobal('PHP_AUTH_USER', 'SERVER'), '@') !== false) { |
@@ -91,22 +91,22 @@ discard block |
||
| 91 | 91 | <input type="text" id="login" class="form-control" placeholder="', filter_var($username, FILTER_SANITIZE_STRING), '" readonly>'; |
| 92 | 92 | } else { |
| 93 | 93 | echo ' |
| 94 | - <input type="text" id="login" class="form-control" placeholder="' . langHdl('index_login') . '">'; |
|
| 94 | + <input type="text" id="login" class="form-control" placeholder="' . langHdl('index_login').'">'; |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | echo ' |
| 98 | 98 | </div>'; |
| 99 | -if (! (isset($SETTINGS['enable_http_request_login']) === true |
|
| 99 | +if (!(isset($SETTINGS['enable_http_request_login']) === true |
|
| 100 | 100 | && (int) $SETTINGS['enable_http_request_login'] === 1 |
| 101 | 101 | && $superGlobal('PHP_AUTH_USER', 'SERVER') !== null |
| 102 | - && ! (isset($SETTINGS['maintenance_mode']) === true |
|
| 102 | + && !(isset($SETTINGS['maintenance_mode']) === true |
|
| 103 | 103 | && (int) $SETTINGS['maintenance_mode'] === 1))) { |
| 104 | 104 | echo ' |
| 105 | 105 | <div class="input-group has-feedback mb-2"> |
| 106 | 106 | <div class="input-group-prepend"> |
| 107 | 107 | <span class="input-group-text"><i class="fas fa-lock fa-fw"></i></span> |
| 108 | 108 | </div> |
| 109 | - <input type="password" id="pw" class="form-control submit-button" placeholder="' . langHdl('index_password') . '"> |
|
| 109 | + <input type="password" id="pw" class="form-control submit-button" placeholder="' . langHdl('index_password').'"> |
|
| 110 | 110 | </div>'; |
| 111 | 111 | } |
| 112 | 112 | |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | <span class="input-group-text"><i class="fas fa-clock fa-fw"></i></span> |
| 117 | 117 | </div> |
| 118 | 118 | <input type="text" id="session_duration" class="form-control submit-button" |
| 119 | - placeholder="' . langHdl('index_session_duration') .' (' . langHdl('minutes') . ')" |
|
| 119 | + placeholder="' . langHdl('index_session_duration').' ('.langHdl('minutes').')" |
|
| 120 | 120 | value="', isset($SETTINGS['default_session_expiration_time']) === true ? $SETTINGS['default_session_expiration_time'] : '', '"> |
| 121 | 121 | </div>'; |
| 122 | 122 | // 2FA auth selector |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | '" /> |
| 130 | 130 | <div class="row mb-3 hidden" id="2fa_methods_selector"> |
| 131 | 131 | <div class="col-12"> |
| 132 | - <h8 class="login-box-msg">' . langHdl('2fa_authentication_selector') . '</h8> |
|
| 132 | + <h8 class="login-box-msg">' . langHdl('2fa_authentication_selector').'</h8> |
|
| 133 | 133 | <div class="2fa-methods text-center mt-2">', |
| 134 | 134 | isset($SETTINGS['google_authentication']) === true && (int) $SETTINGS['google_authentication'] === 1 ? |
| 135 | 135 | ' |
@@ -177,11 +177,11 @@ discard block |
||
| 177 | 177 | <div class="col-1"> |
| 178 | 178 | </div> |
| 179 | 179 | <div class="col-8"> |
| 180 | - <input type="text" id="ga_code" class="form-control submit-button" placeholder="' . langHdl('ga_identification_code') . '" /> |
|
| 180 | + <input type="text" id="ga_code" class="form-control submit-button" placeholder="' . langHdl('ga_identification_code').'" /> |
|
| 181 | 181 | </div> |
| 182 | 182 | <div class="col-1"> |
| 183 | 183 | <i class="fas fa-envelope form-control-feedback pointer infotip text-info" |
| 184 | - title="' . langHdl('i_need_to_generate_new_ga_code') . '" onclick="send_user_new_temporary_ga_code()"></i> |
|
| 184 | + title="' . langHdl('i_need_to_generate_new_ga_code').'" onclick="send_user_new_temporary_ga_code()"></i> |
|
| 185 | 185 | </div> |
| 186 | 186 | </div> |
| 187 | 187 | <div id="div-2fa-google-qr" class="row mt-2 "></div> |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | <script> |
| 199 | 199 | var seconds = 1; |
| 200 | 200 | function updateLogonButton(timeToGo){ |
| 201 | - document.getElementById("but_identify_user").value = "' . langHdl('duration_login_attempt') . ' " + timeToGo; |
|
| 201 | + document.getElementById("but_identify_user").value = "' . langHdl('duration_login_attempt').' " + timeToGo; |
|
| 202 | 202 | } |
| 203 | 203 | $( window ).on( "load", function() { |
| 204 | 204 | updateLogonButton(seconds); |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | if (seconds >= 0) { |
| 208 | 208 | updateLogonButton(seconds); |
| 209 | 209 | } else if(seconds === 0) { |
| 210 | - launchIdentify("", "' . $nextUrl . '"); |
|
| 210 | + launchIdentify("", "' . $nextUrl.'"); |
|
| 211 | 211 | } |
| 212 | 212 | updateLogonButton(seconds); |
| 213 | 213 | }, |
@@ -228,15 +228,15 @@ discard block |
||
| 228 | 228 | <div class="col-8"> |
| 229 | 229 | <div id="yubiko-new-key" class="alert alert-info hidden"> |
| 230 | 230 | <p> |
| 231 | - <input type="text" size="10" id="yubico_user_id" class="form-control" placeholder="' . langHdl('yubico_user_id') . '"> |
|
| 231 | + <input type="text" size="10" id="yubico_user_id" class="form-control" placeholder="' . langHdl('yubico_user_id').'"> |
|
| 232 | 232 | </p> |
| 233 | 233 | <p> |
| 234 | - <input type="text" size="10" id="yubico_user_key" class="form-control" placeholder="' . langHdl('yubico_user_key') . '"> |
|
| 234 | + <input type="text" size="10" id="yubico_user_key" class="form-control" placeholder="' . langHdl('yubico_user_key').'"> |
|
| 235 | 235 | </p> |
| 236 | 236 | </div> |
| 237 | - <input autocomplete="off" type="text" id="yubico_key" class="form-control submit-button" placeholder="' . langHdl('press_your_yubico_key') . '"> |
|
| 237 | + <input autocomplete="off" type="text" id="yubico_key" class="form-control submit-button" placeholder="' . langHdl('press_your_yubico_key').'"> |
|
| 238 | 238 | <div class="row"> |
| 239 | - <span class="ml-2 mt-1 font-weight-light small pointer" id="register-yubiko-key">' . langHdl('register_new_yubiko_key') . '</span> |
|
| 239 | + <span class="ml-2 mt-1 font-weight-light small pointer" id="register-yubiko-key">' . langHdl('register_new_yubiko_key').'</span> |
|
| 240 | 240 | </div> |
| 241 | 241 | </div> |
| 242 | 242 | </div>'; |
@@ -245,22 +245,22 @@ discard block |
||
| 245 | 245 | echo ' |
| 246 | 246 | <div class="row mb-3 mt-5"> |
| 247 | 247 | <div class="col-12"> |
| 248 | - <button id="but_identify_user" class="btn btn-primary btn-block">' . langHdl('log_in') . '</button> |
|
| 248 | + <button id="but_identify_user" class="btn btn-primary btn-block">' . langHdl('log_in').'</button> |
|
| 249 | 249 | |
| 250 | 250 | <!-- In case of upgrade, the user has to provide his One Time Code --> |
| 251 | 251 | <div class="card-body user-one-time-code-card-body hidden"> |
| 252 | - <h5 class="login-box-msg">' . langHdl('provide_personal_one_time_code') . '</h5> |
|
| 252 | + <h5 class="login-box-msg">' . langHdl('provide_personal_one_time_code').'</h5> |
|
| 253 | 253 | |
| 254 | 254 | <div class="input-group has-feedback mb-2 mt-4"> |
| 255 | 255 | <div class="input-group-prepend"> |
| 256 | 256 | <span class="input-group-text"><i class="fas fa-unlock-alt"></i></span> |
| 257 | 257 | </div> |
| 258 | - <input type="password" id="user-one-time-code" class="form-control" placeholder="' . langHdl('one_time_code') . '"> |
|
| 258 | + <input type="password" id="user-one-time-code" class="form-control" placeholder="' . langHdl('one_time_code').'"> |
|
| 259 | 259 | </div> |
| 260 | 260 | |
| 261 | 261 | <div class="row mb-3"> |
| 262 | 262 | <div class="col-12"> |
| 263 | - <button id="but_confirm_otc" class="btn btn-primary btn-block">' . langHdl('confirm') . '</button> |
|
| 263 | + <button id="but_confirm_otc" class="btn btn-primary btn-block">' . langHdl('confirm').'</button> |
|
| 264 | 264 | </div> |
| 265 | 265 | </div> |
| 266 | 266 | </div> |
@@ -275,10 +275,10 @@ discard block |
||
| 275 | 275 | // In case of password change |
| 276 | 276 | echo ' |
| 277 | 277 | <div class="card-body confirm-password-card-body hidden"> |
| 278 | - <h5 class="login-box-msg">' . langHdl('new_password_required') . '</h5> |
|
| 278 | + <h5 class="login-box-msg">' . langHdl('new_password_required').'</h5> |
|
| 279 | 279 | |
| 280 | 280 | <div class="alert alert-info"> |
| 281 | - <div class="text-center"><i class="icon fa fa-info"></i>' . langHdl('password_strength') . ' |
|
| 281 | + <div class="text-center"><i class="icon fa fa-info"></i>' . langHdl('password_strength').' |
|
| 282 | 282 | <span id="confirm-password-level" class="ml-2 font-weight-bold"></span></div> |
| 283 | 283 | </div> |
| 284 | 284 | |
@@ -288,20 +288,20 @@ discard block |
||
| 288 | 288 | <div class="input-group-prepend"> |
| 289 | 289 | <span class="input-group-text"><i class="fa fa-key"></i></span> |
| 290 | 290 | </div> |
| 291 | - <input type="password" id="current-user-password" class="form-control" placeholder="' . langHdl('current_password') . '"> |
|
| 291 | + <input type="password" id="current-user-password" class="form-control" placeholder="' . langHdl('current_password').'"> |
|
| 292 | 292 | </div> |
| 293 | 293 | </div> |
| 294 | 294 | <div class="input-group has-feedback mb-2 mt-4"> |
| 295 | 295 | <div class="input-group-prepend"> |
| 296 | 296 | <span class="input-group-text"><i class="fa fa-key"></i></span> |
| 297 | 297 | </div> |
| 298 | - <input type="password" id="new-user-password" class="form-control" placeholder="' . langHdl('index_new_pw') . '"> |
|
| 298 | + <input type="password" id="new-user-password" class="form-control" placeholder="' . langHdl('index_new_pw').'"> |
|
| 299 | 299 | </div> |
| 300 | 300 | <div class="input-group has-feedback mb-2"> |
| 301 | 301 | <div class="input-group-prepend"> |
| 302 | 302 | <span class="input-group-text"><i class="fa fa-key"></i></span> |
| 303 | 303 | </div> |
| 304 | - <input type="password" id="new-user-password-confirm" class="form-control" placeholder="' . langHdl('index_change_pw_confirmation') . '"> |
|
| 304 | + <input type="password" id="new-user-password-confirm" class="form-control" placeholder="' . langHdl('index_change_pw_confirmation').'"> |
|
| 305 | 305 | </div> |
| 306 | 306 | <div class="row mb-3"> |
| 307 | 307 | <div class="col-md-12 offset-sm-4 text-center"> |
@@ -312,7 +312,7 @@ discard block |
||
| 312 | 312 | </div> |
| 313 | 313 | <div class="row mb-3"> |
| 314 | 314 | <div class="col-12"> |
| 315 | - <button id="but_confirm_new_password" class="btn btn-primary btn-block">' . langHdl('confirm') . '</button> |
|
| 315 | + <button id="but_confirm_new_password" class="btn btn-primary btn-block">' . langHdl('confirm').'</button> |
|
| 316 | 316 | </div> |
| 317 | 317 | </div> |
| 318 | 318 | </div> |
@@ -320,20 +320,20 @@ discard block |
||
| 320 | 320 | |
| 321 | 321 | <div class="card-body hidden" id="card-user-treat-psk"> |
| 322 | 322 | <div class="alert alert-info"> |
| 323 | - <div class="text-center"><i class="icon fa fa-info"></i>' . langHdl('user_has_psk_info') . '</div> |
|
| 323 | + <div class="text-center"><i class="icon fa fa-info"></i>' . langHdl('user_has_psk_info').'</div> |
|
| 324 | 324 | </div> |
| 325 | 325 | <div class="input-group has-feedback mb-2"> |
| 326 | 326 | <div class="input-group-prepend"> |
| 327 | 327 | <span class="input-group-text"><i class="fa fa-key"></i></span> |
| 328 | 328 | </div> |
| 329 | - <input type="password" id="user-old-defuse-psk" class="form-control" placeholder="' . langHdl('home_personal_saltkey') . '"> |
|
| 329 | + <input type="password" id="user-old-defuse-psk" class="form-control" placeholder="' . langHdl('home_personal_saltkey').'"> |
|
| 330 | 330 | </div> |
| 331 | 331 | <div class="row mb-3 mt-4"> |
| 332 | 332 | <div class="col-12"> |
| 333 | - <button id="but_confirm_defuse_psk" class="btn btn-primary btn-block">' . langHdl('launch') . '</button> |
|
| 333 | + <button id="but_confirm_defuse_psk" class="btn btn-primary btn-block">' . langHdl('launch').'</button> |
|
| 334 | 334 | </div> |
| 335 | 335 | <div class="col-12 mt-3"> |
| 336 | - <button id="but_confirm_forgot_defuse_psk" class="btn btn-danger btn-block text-bold">' . langHdl('i_cannot_remember') . '</button> |
|
| 336 | + <button id="but_confirm_forgot_defuse_psk" class="btn btn-danger btn-block text-bold">' . langHdl('i_cannot_remember').'</button> |
|
| 337 | 337 | </div> |
| 338 | 338 | </div> |
| 339 | 339 | </div> |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | require_once 'SecureHandler.php'; |
| 29 | 29 | session_name('teampass_session'); |
| 30 | 30 | session_start(); |
| 31 | -if (! isset($_SESSION['CPM']) || $_SESSION['CPM'] === false || ! isset($_SESSION['key']) || empty($_SESSION['key'])) { |
|
| 31 | +if (!isset($_SESSION['CPM']) || $_SESSION['CPM'] === false || !isset($_SESSION['key']) || empty($_SESSION['key'])) { |
|
| 32 | 32 | die('Hacking attempt...'); |
| 33 | 33 | } |
| 34 | 34 | |