Skip to content

Commit

Permalink
3.0.10
Browse files Browse the repository at this point in the history
Fix for #3945
  • Loading branch information
nilsteampassnet committed Nov 16, 2023
1 parent 5543cb4 commit 883394a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 14 deletions.
4 changes: 2 additions & 2 deletions api/Model/AuthModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ public function getUserAuth(string $login, string $password, string $apikey): ar
*/
private function createUserJWT(int $id, string $login, int $pf_enabled, string $pubkey, string $privkey, string $folders, string $items): array
{
include_once API_ROOT_PATH . '/../includes/config/tp.config.php';
//$headers = ['alg'=>'HS256','typ'=>'JWT'];
include API_ROOT_PATH . '/../includes/config/tp.config.php';

$payload = [
'username' => $login,
'id' => $id,
Expand Down
2 changes: 1 addition & 1 deletion includes/config/include.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
define('TP_VERSION', '3.0.10');
define("UPGRADE_MIN_DATE", "1697990713");
define('TP_VERSION_MINOR', '149');
define('TP_VERSION_MINOR', '150');
define('TP_TOOL_NAME', 'Teampass');
define('TP_ONE_DAY_SECONDS', 86400);
define('TP_ONE_WEEK_SECONDS', 604800);
Expand Down
9 changes: 2 additions & 7 deletions includes/libraries/teampassclasses/language/src/Language.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,8 @@ class Language {

public function __construct($language = null, $path = __DIR__."/../../../../language") {
$superGlobal = new SuperGlobal();
if (null === $language || empty($language) === true) {
$userLanguage = $superGlobal->get('user_language', 'SESSION', 'user');
if (null !== $userLanguage) {
$language = $userLanguage;
} else {
$language = 'english';
}
if (null === $language || empty($language) === true ) {
$language = 'english';
}
$this->setLanguage($language, $path);
}
Expand Down
4 changes: 2 additions & 2 deletions pages/options.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,9 @@
<select class='form-control form-control-sm' id='default_language'>
<option value=''>-- <?php echo $lang->get('select'); ?> --</option>
<?php
foreach ($languagesList as $lang) {
foreach ($languagesList as $teampassLang) {
echo '
<option value="' . $lang . '"', isset($SETTINGS['default_language']) === true && $SETTINGS['default_language'] === $lang ? ' selected' : '', '>' . $lang . '</option>';
<option value="' . $teampassLang . '"', isset($SETTINGS['default_language']) === true && $SETTINGS['default_language'] === $teampassLang ? ' selected' : '', '>' . $teampassLang . '</option>';
}
?>
</select>
Expand Down
2 changes: 1 addition & 1 deletion scripts/task_maintenance_purge_old_files.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function purgeTemporaryFiles(): void
{
// Load expected files
require_once __DIR__. '/../sources/main.functions.php';
require_once __DIR__. '/../includes/config/tp.config.php';
require __DIR__. '/../includes/config/tp.config.php';

if (isset($SETTINGS) === true) {
//read folder
Expand Down
1 change: 0 additions & 1 deletion sources/main.queries.php
Original file line number Diff line number Diff line change
Expand Up @@ -1659,7 +1659,6 @@ function changePrivateKeyEncryptionPassword(

// Load superGlobals
$superGlobal = new SuperGlobal();
$lang = new Language();
$superGlobal->put('private_key', $privateKey, 'SESSION', 'user');
}

Expand Down

0 comments on commit 883394a

Please sign in to comment.