@@ -56,7 +56,7 @@ |
||
| 56 | 56 | } elseif (substr_count($val, '$pre = ') > 0) { |
| 57 | 57 | $_SESSION['pre'] = getSettingValue($val); |
| 58 | 58 | } elseif (substr_count($val, "define('SECUREPATH',") > 0) { |
| 59 | - $_SESSION['sk_file'] = substr($val, 23, strpos($val, ');')-24)."/sk.php"; |
|
| 59 | + $_SESSION['sk_file'] = substr($val, 23, strpos($val, ');') - 24)."/sk.php"; |
|
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | } |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | $config->setIgnoreHeaderLine("true"); |
| 138 | 138 | // extract data from CSV file |
| 139 | 139 | $interpreter = new Interpreter(); |
| 140 | - $interpreter->addObserver(function (array $row) use (&$valuesToImport) { |
|
| 140 | + $interpreter->addObserver(function(array $row) use (&$valuesToImport) { |
|
| 141 | 141 | $valuesToImport[] = array( |
| 142 | 142 | 'Label' => $row[0], |
| 143 | 143 | 'Login' => $row[1], |
@@ -966,7 +966,7 @@ discard block |
||
| 966 | 966 | break; |
| 967 | 967 | } |
| 968 | 968 | |
| 969 | -spl_autoload_register(function ($class) { |
|
| 969 | +spl_autoload_register(function($class) { |
|
| 970 | 970 | $prefix = 'League\\Csv\\'; |
| 971 | 971 | $base_dir = __DIR__.'/src/'; |
| 972 | 972 | $len = strlen($prefix); |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | //load full tree |
| 106 | 106 | $tree->rebuild(); |
| 107 | 107 | $tree = $tree->getDescendants(); |
| 108 | - // Init post variable |
|
| 108 | + // Init post variable |
|
| 109 | 109 | $post_operation_id = filter_input(INPUT_POST, 'file', FILTER_SANITIZE_NUMBER_INT); |
| 110 | 110 | |
| 111 | 111 | // Get filename from database |
@@ -436,7 +436,7 @@ discard block |
||
| 436 | 436 | } |
| 437 | 437 | |
| 438 | 438 | /** |
| 439 | - ** Recursive function that will permit to read each level of XML nodes |
|
| 439 | + ** Recursive function that will permit to read each level of XML nodes |
|
| 440 | 440 | */ |
| 441 | 441 | function recursiveKeepassXML($xmlRoot, $xmlLevel = 0) |
| 442 | 442 | { |
@@ -586,7 +586,7 @@ discard block |
||
| 586 | 586 | |
| 587 | 587 | //recursive call |
| 588 | 588 | if ($history !== true) { |
| 589 | - recursiveKeepassXML($xmlChildren, $xmlLevel + 1); |
|
| 589 | + recursiveKeepassXML($xmlChildren, $xmlLevel + 1); |
|
| 590 | 590 | } |
| 591 | 591 | |
| 592 | 592 | // Force History to false |
@@ -427,7 +427,7 @@ |
||
| 427 | 427 | } elseif (substr_count($val, '$pre') > 0) { |
| 428 | 428 | $pre = getSettingValue($val); |
| 429 | 429 | } elseif (substr_count($val, "define('SECUREPATH',") > 0) { |
| 430 | - $superGlobal->put("sk_file", substr($val, 23, strpos($val, ');')-24)."/sk.php", "SESSION"); |
|
| 430 | + $superGlobal->put("sk_file", substr($val, 23, strpos($val, ');') - 24)."/sk.php", "SESSION"); |
|
| 431 | 431 | } |
| 432 | 432 | } |
| 433 | 433 | } |
@@ -85,8 +85,8 @@ |
||
| 85 | 85 | ); |
| 86 | 86 | if ($row['valeur'] === "true") { |
| 87 | 87 | /** |
| 88 | - * Permits to delete files and folders recursively |
|
| 89 | - */ |
|
| 88 | + * Permits to delete files and folders recursively |
|
| 89 | + */ |
|
| 90 | 90 | function delTree($dir) |
| 91 | 91 | { |
| 92 | 92 | $files = array_diff(scandir($dir), array('.', '..')); |
@@ -201,7 +201,7 @@ |
||
| 201 | 201 | logEvents('user_mngt', 'at_user_pwd_changed', $_SESSION['user_id'], $_SESSION['login'], $_SESSION['user_id']); |
| 202 | 202 | echo '[ { "error" : "none" } ]'; |
| 203 | 203 | } else { |
| 204 | - echo '[ { "error" : "pwd_hash_not_correct" } ]'; |
|
| 204 | + echo '[ { "error" : "pwd_hash_not_correct" } ]'; |
|
| 205 | 205 | } |
| 206 | 206 | break; |
| 207 | 207 | |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | } elseif (null !== filter_input(INPUT_POST, 'change_pw_origine', FILTER_SANITIZE_STRING) |
| 209 | 209 | && ((filter_input(INPUT_POST, 'change_pw_origine', FILTER_SANITIZE_STRING) === "admin_change" |
| 210 | 210 | || filter_input(INPUT_POST, 'change_pw_origine', FILTER_SANITIZE_STRING) === "user_change" |
| 211 | - ) && ($_SESSION['user_admin'] === "1"|| $_SESSION['user_manager'] === "1" |
|
| 211 | + ) && ($_SESSION['user_admin'] === "1" || $_SESSION['user_manager'] === "1" |
|
| 212 | 212 | || $_SESSION['user_can_manage_all_users'] === "1") |
| 213 | 213 | ) |
| 214 | 214 | ) { |
@@ -1249,10 +1249,10 @@ discard block |
||
| 1249 | 1249 | |
| 1250 | 1250 | // Identify url to anonymize it |
| 1251 | 1251 | if (strpos($line, 'cpassman_url') > 0 && empty($url_found) === true) { |
| 1252 | - $url_found = substr($line, 19, strlen($line) - 22);//echo $url_found." ; "; |
|
| 1252 | + $url_found = substr($line, 19, strlen($line) - 22); //echo $url_found." ; "; |
|
| 1253 | 1253 | $tmp = parse_url($url_found); |
| 1254 | - $anonym_url = $tmp['scheme'] . '://<anonym_url>' . $tmp['path']; |
|
| 1255 | - $line = "'cpassman_url' => '" . $anonym_url . "\n"; |
|
| 1254 | + $anonym_url = $tmp['scheme'].'://<anonym_url>'.$tmp['path']; |
|
| 1255 | + $line = "'cpassman_url' => '".$anonym_url."\n"; |
|
| 1256 | 1256 | } |
| 1257 | 1257 | |
| 1258 | 1258 | // Anonymize all urls |
@@ -1319,7 +1319,7 @@ discard block |
||
| 1319 | 1319 | |
| 1320 | 1320 | **Teampass configuration file:** |
| 1321 | 1321 | ``` |
| 1322 | -" . $list_of_options . " |
|
| 1322 | +" . $list_of_options." |
|
| 1323 | 1323 | ``` |
| 1324 | 1324 | |
| 1325 | 1325 | **Updated from an older Teampass or fresh install:** |
@@ -1334,12 +1334,12 @@ discard block |
||
| 1334 | 1334 | |
| 1335 | 1335 | #### Web server error log |
| 1336 | 1336 | ``` |
| 1337 | -" . $err['message']." - ".$err['file']." (".$err['line'] .") |
|
| 1337 | +" . $err['message']." - ".$err['file']." (".$err['line'].") |
|
| 1338 | 1338 | ``` |
| 1339 | 1339 | |
| 1340 | 1340 | #### Teampass 10 last system errors |
| 1341 | 1341 | ``` |
| 1342 | -" . $teampass_errors ." |
|
| 1342 | +" . $teampass_errors." |
|
| 1343 | 1343 | ``` |
| 1344 | 1344 | |
| 1345 | 1345 | #### Log from the web-browser developer console (CTRL + SHIFT + i) |
@@ -309,7 +309,7 @@ |
||
| 309 | 309 | BeforeUpload: function (up, file) { |
| 310 | 310 | $("#import_status_ajax_loader").show(); |
| 311 | 311 | up.settings.multipart_params = { |
| 312 | - "PHPSESSID":"<?php echo $_SESSION['user_id'];?>", |
|
| 312 | + "PHPSESSID":"<?php echo $_SESSION['user_id']; ?>", |
|
| 313 | 313 | "type_upload":"import_items_from_keypass", |
| 314 | 314 | "user_token": $("#import_user_token").val() |
| 315 | 315 | }; |
@@ -711,7 +711,7 @@ |
||
| 711 | 711 | utf8_encode( |
| 712 | 712 | "<?php |
| 713 | 713 | global \$SETTINGS; |
| 714 | -\$SETTINGS = array (" . $config_text . " |
|
| 714 | +\$SETTINGS = array (" . $config_text." |
|
| 715 | 715 | );" |
| 716 | 716 | ) |
| 717 | 717 | ); |
@@ -886,7 +886,7 @@ |
||
| 886 | 886 | /*FOLDER */ |
| 887 | 887 | if ($data['id_tree'] != $dataReceived['categorie']) { |
| 888 | 888 | // Get name of folders |
| 889 | - $dataTmp = DB::query("SELECT title FROM ".prefix_table("nested_tree")." WHERE id IN %li", array($data['id_tree'],$dataReceived['categorie'])); |
|
| 889 | + $dataTmp = DB::query("SELECT title FROM ".prefix_table("nested_tree")." WHERE id IN %li", array($data['id_tree'], $dataReceived['categorie'])); |
|
| 890 | 890 | |
| 891 | 891 | logItems($dataReceived['id'], $label, $_SESSION['user_id'], 'at_modification', $_SESSION['login'], 'at_category : '.$dataTmp[0]['title'].' => '.$dataTmp[1]['title']); |
| 892 | 892 | // ask for page reloading |
@@ -2166,12 +2166,12 @@ discard block |
||
| 2166 | 2166 | |
| 2167 | 2167 | // Check that user can access this folder |
| 2168 | 2168 | if (( |
| 2169 | - in_array($post_source_folder_id, $_SESSION['groupes_visibles']) === false || |
|
| 2169 | + in_array($post_source_folder_id, $_SESSION['groupes_visibles']) === false || |
|
| 2170 | 2170 | in_array($post_target_folder_id, $_SESSION['groupes_visibles']) === false) && |
| 2171 | 2171 | ( |
| 2172 | - $post_target_folder_id === '0' && |
|
| 2172 | + $post_target_folder_id === '0' && |
|
| 2173 | 2173 | isset($SETTINGS['can_create_root_folder']) === true && $SETTINGS['can_create_root_folder'] === '1' |
| 2174 | - ) |
|
| 2174 | + ) |
|
| 2175 | 2175 | ) { |
| 2176 | 2176 | $returnValues = '[{"error" : "'.addslashes($LANG['error_not_allowed_to']).'"}]'; |
| 2177 | 2177 | echo $returnValues; |
@@ -3168,7 +3168,7 @@ discard block |
||
| 3168 | 3168 | if ((isset($_SESSION['user_settings']['session_psk']) === false || empty($_SESSION['user_settings']['session_psk']) === true) |
| 3169 | 3169 | && ($dataSource['personal_folder'] === '1' || $dataDestination['personal_folder'] === '1') |
| 3170 | 3170 | ) { |
| 3171 | - echo '[{"error" : "ERR_PSK_REQUIRED"}]'; |
|
| 3171 | + echo '[{"error" : "ERR_PSK_REQUIRED"}]'; |
|
| 3172 | 3172 | break; |
| 3173 | 3173 | } |
| 3174 | 3174 | |
@@ -4279,19 +4279,19 @@ discard block |
||
| 4279 | 4279 | $ret = sendEmail( |
| 4280 | 4280 | $LANG['email_request_access_subject'], |
| 4281 | 4281 | str_replace( |
| 4282 | - array( |
|
| 4283 | - '#tp_item_author#', |
|
| 4284 | - '#tp_user#', |
|
| 4285 | - '#tp_item#', |
|
| 4286 | - '#tp_reason#' |
|
| 4287 | - ), |
|
| 4288 | - array( |
|
| 4289 | - " ".addslashes($dataAuthor['login']), |
|
| 4290 | - addslashes($_SESSION['login']), |
|
| 4291 | - addslashes($dataItem['label']), |
|
| 4292 | - nl2br(addslashes($emailText)) |
|
| 4293 | - ), |
|
| 4294 | - $LANG['email_request_access_mail'] |
|
| 4282 | + array( |
|
| 4283 | + '#tp_item_author#', |
|
| 4284 | + '#tp_user#', |
|
| 4285 | + '#tp_item#', |
|
| 4286 | + '#tp_reason#' |
|
| 4287 | + ), |
|
| 4288 | + array( |
|
| 4289 | + " ".addslashes($dataAuthor['login']), |
|
| 4290 | + addslashes($_SESSION['login']), |
|
| 4291 | + addslashes($dataItem['label']), |
|
| 4292 | + nl2br(addslashes($emailText)) |
|
| 4293 | + ), |
|
| 4294 | + $LANG['email_request_access_mail'] |
|
| 4295 | 4295 | ), |
| 4296 | 4296 | $dataAuthor['email'], |
| 4297 | 4297 | $LANG, |
@@ -4300,11 +4300,11 @@ discard block |
||
| 4300 | 4300 | |
| 4301 | 4301 | // Do log |
| 4302 | 4302 | logItems( |
| 4303 | - $item_id, |
|
| 4304 | - $dataItem['label'], |
|
| 4305 | - $_SESSION['user_id'], |
|
| 4306 | - 'at_access', |
|
| 4307 | - $_SESSION['login'] |
|
| 4303 | + $item_id, |
|
| 4304 | + $dataItem['label'], |
|
| 4305 | + $_SESSION['user_id'], |
|
| 4306 | + 'at_access', |
|
| 4307 | + $_SESSION['login'] |
|
| 4308 | 4308 | ); |
| 4309 | 4309 | |
| 4310 | 4310 | // Return |
@@ -227,15 +227,15 @@ |
||
| 227 | 227 | } |
| 228 | 228 | $tmp = mysqli_num_rows(mysqli_query($dbTmp, "SELECT * FROM `_install` WHERE `key` = 'url_path'")); |
| 229 | 229 | if (intval($tmp) === 0) { |
| 230 | - mysqli_query($dbTmp, "INSERT INTO `_install` (`key`, `value`) VALUES ('url_path', '". empty($session_url_path) ? $db['url_path'] : $session_url_path. "');"); |
|
| 230 | + mysqli_query($dbTmp, "INSERT INTO `_install` (`key`, `value`) VALUES ('url_path', '".empty($session_url_path) ? $db['url_path'] : $session_url_path."');"); |
|
| 231 | 231 | } else { |
| 232 | 232 | mysqli_query($dbTmp, "UPDATE `_install` SET `value` = '", empty($session_url_path) ? $db['url_path'] : $session_url_path, "' WHERE `key` = 'url_path';"); |
| 233 | 233 | } |
| 234 | 234 | $tmp = mysqli_num_rows(mysqli_query($dbTmp, "SELECT * FROM `_install` WHERE `key` = 'abspath'")); |
| 235 | 235 | if (intval($tmp) === 0) { |
| 236 | - mysqli_query($dbTmp, "INSERT INTO `_install` (`key`, `value`) VALUES ('abspath', '". empty($session_abspath) ? $db['abspath'] : $session_abspath. "');"); |
|
| 236 | + mysqli_query($dbTmp, "INSERT INTO `_install` (`key`, `value`) VALUES ('abspath', '".empty($session_abspath) ? $db['abspath'] : $session_abspath."');"); |
|
| 237 | 237 | } else { |
| 238 | - mysqli_query($dbTmp, "UPDATE `_install` SET `value` = '". empty($session_abspath) ? $db['abspath'] : $session_abspath. "' WHERE `key` = 'abspath';"); |
|
| 238 | + mysqli_query($dbTmp, "UPDATE `_install` SET `value` = '".empty($session_abspath) ? $db['abspath'] : $session_abspath."' WHERE `key` = 'abspath';"); |
|
| 239 | 239 | } |
| 240 | 240 | |
| 241 | 241 | echo '[{"error" : "", "result" : "Connection is successful", "multiple" : ""}]'; |