Skip to content

Commit b78fc7e

Browse files
3.0.0.12
Fix empty page after user password change Fix user first connection with no items in DB
1 parent b89b344 commit b78fc7e

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

includes/config/include.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* @see http://www.teampass.net
1818
*/
1919
define('TP_VERSION', '3.0.0');
20-
define('TP_VERSION_FULL', TP_VERSION.'.11');
20+
define('TP_VERSION_FULL', TP_VERSION.'.12');
2121
define('TP_TOOL_NAME', 'Teampass');
2222
define('TP_ONE_DAY_SECONDS', 86400);
2323
define('TP_ONE_WEEK_SECONDS', 604800);

includes/core/load.js.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ function(data) {
686686
);
687687
$("#dialog-user-change-password-progress").html('');
688688
$('#dialog-user-change-password').addClass('hidden');
689-
$('.content-header, .content').removelass('hidden');
689+
$('.content-header, .content').removeClass('hidden');
690690
}
691691
}
692692
);

pages/items.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@
261261
<span class="ml-2 col-md-1 clear-me-html" id="form-item-icon-show"></span>
262262
</div>
263263
<small class='form-text text-muted'>
264-
<?php echo langHdl('icon_tip'); ?>
264+
<?php echo langHdl('folder_icon_tip'); ?>
265265
</small>
266266
</div>
267267

sources/main.queries.php

+17-3
Original file line numberDiff line numberDiff line change
@@ -1238,6 +1238,20 @@ function isUserPasswordCorrect(
12381238
$post_user_id
12391239
);
12401240

1241+
if (DB::count() === 0) {
1242+
// This user has no items
1243+
// let's consider no items in DB
1244+
return prepareExchangedData(
1245+
$SETTINGS['cpassman_dir'],
1246+
array(
1247+
'error' => false,
1248+
'message' => '',
1249+
'debug' => '',
1250+
),
1251+
'encode'
1252+
);
1253+
}
1254+
12411255
// Get itemKey from current user
12421256
$currentUserKey = DB::queryFirstRow(
12431257
'SELECT share_key, increment_id
@@ -1256,7 +1270,7 @@ function isUserPasswordCorrect(
12561270
if (empty(base64_decode($itemKey)) === false) {
12571271
// GOOD password
12581272
return prepareExchangedData(
1259-
$SETTINGS['cpassman_dir'],
1273+
$SETTINGS['cpassman_dir'],
12601274
array(
12611275
'error' => false,
12621276
'message' => '',
@@ -1276,7 +1290,7 @@ function isUserPasswordCorrect(
12761290
if ($pwdlib->verifyPasswordHash(htmlspecialchars_decode($post_user_password), $userInfo['pw']) === true) {
12771291
// GOOD password
12781292
return prepareExchangedData(
1279-
$SETTINGS['cpassman_dir'],
1293+
$SETTINGS['cpassman_dir'],
12801294
array(
12811295
'error' => false,
12821296
'message' => '',
@@ -1293,7 +1307,7 @@ function isUserPasswordCorrect(
12931307
array(
12941308
'error' => true,
12951309
'message' => langHdl('password_is_not_correct'),
1296-
'debug' => isset($itemKey) === true ? base64_decode($itemKey) : '',
1310+
//'debug' => isset($itemKey) === true ? base64_decode($itemKey) : '',
12971311
),
12981312
'encode'
12991313
);

0 commit comments

Comments
 (0)