Skip to content

Commit e5060c5

Browse files
Merge branch 'release/3.1.4.41'
2 parents ba5884d + f911526 commit e5060c5

30 files changed

+211
-93
lines changed

files_reference.txt

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ includes/.externals/tp.config.php 361da70add00e1069f22191dbb07503c
112112
includes/avatars/.htaccess df51d5d900c2228ec1349362838401e7
113113
includes/avatars/empty_file.txt d41d8cd98f00b204e9800998ecf8427e
114114
includes/config/.htaccess 51622ead2639d535e7a955a8a7a10613
115-
includes/config/include.php 1956860ef43ab0473b7abb559d206184
115+
includes/config/include.php de54488d790bcc045e52f1779b7d2468
116116
includes/config/index.html 5f1f28d1adcb7eac03989f0ca3e7068e
117117
includes/config/settings.sample.php c966188ae4f3174b907fc467c96ac036
118-
includes/core/load.js.php 60a83c1933ad8ae52f4361f03b3accea
118+
includes/core/load.js.php 24b39a9a8b688004d82ce6e3f5578474
119119
includes/core/login.js.php 351dcf1deaea3ac50920d6515c44bf62
120120
includes/core/login.oauth2.php d2da59d5963870e975344449c1bc4328
121121
includes/core/login.php bb817c345ba6de38aa1c9c250d8e3da9
@@ -175,10 +175,10 @@ includes/js/CreateRandomString.js 169408165b8be967ba25505524d1f676
175175
includes/js/functions.js b174482aa8f1df4be18a7c305804e4c1
176176
includes/js/secure-clipboard-cleaner.js 098bc87fbbc3e0b8626306dcd8a10273
177177
includes/language/arabic.php fbead6ad419ab93ec4af5fe46316dd46
178-
includes/language/bulgarian.php 0cf9b73c1176d8c0bf7349a2427bc249
179-
includes/language/catalan.php eeb5aa4b0aa323a9ca1e5731731c78bf
180-
includes/language/chinese.php 5ab820629049a0380faee76d78bcfbe8
181-
includes/language/czech.php 7d58a5bdc1d0d287b490cf4bd1533611
178+
includes/language/bulgarian.php d84887551742301c98e81da2b5028df4
179+
includes/language/catalan.php f35a3295e7675c25fa15727705175632
180+
includes/language/chinese.php ad727fefaace9d177148332173d8c896
181+
includes/language/czech.php 821949e0b4f8056cf9bff950a9a2e990
182182
includes/language/datatables.bulgarian.txt f8760db3ed02790a55d9831ae9f2107a
183183
includes/language/datatables.catalan.txt 620a880abafdfaa4ceeffbf8caac43e2
184184
includes/language/datatables.chinese.txt 2323b2f7a18fc09834c30b113e6c8928
@@ -200,26 +200,26 @@ includes/language/datatables.spanish.txt 4ef4ed678ab1d06aef7e6029a09ccfb4
200200
includes/language/datatables.turkish.txt 72029c69092185073e741d1b0cae543f
201201
includes/language/datatables.ukrainian.txt 8c9f26eee807a87411b5d7c5e8fdf149
202202
includes/language/datatables.vietnamese.txt f9b6e7a07d0f6533f186dac4b3499dd4
203-
includes/language/dutch.php 3e3029b92407d83b7b429ab855adc408
204-
includes/language/english.php 4109ec8b9e6f276a7cf496315b34a480
205-
includes/language/estonian.php 91393495a1b90425beb84d76878babaa
206-
includes/language/french.php b5a8a742fa98d280b13d1412c666d932
207-
includes/language/german.php 72cbcc5849fd2b437c8f72af78401ac2
208-
includes/language/greek.php f0816f8ba26d786f6aa78d64b9dc6717
209-
includes/language/hungarian.php 76100e939284e805f50c2f87c8d5d91d
210-
includes/language/italian.php 27efc4435c1afd015d9369c8b5ff4d61
211-
includes/language/japanese.php 003d4f6cb68035546ba35e8c20b60b6b
212-
includes/language/norwegian.php 79ea58e39c0969f31da28283757b8613
213-
includes/language/polish.php e22c5cab28cfec1bc7ec30b74c4b6668
214-
includes/language/portuguese.php 4194b218ee4bfe3f417ad56f82676d3e
215-
includes/language/portuguese_br.php 1c0bc76ca602675b9a3b4710e7a160ce
216-
includes/language/romanian.php 324daf2240db702a41f11a43209a1509
217-
includes/language/russian.php 0bb89d18b46daf6c1aa5c917d68148f9
218-
includes/language/spanish.php 8a4210ec9dcace0d30586b972ae95531
219-
includes/language/swedish.php 459096a4623590b270fad35462b7ba6b
220-
includes/language/turkish.php 05f9f0858763e982b80e27ff15d80a13
221-
includes/language/ukrainian.php 0cfc850ccf165206e0737e8baefa126d
222-
includes/language/vietnamese.php d8f63230db77b13c83af2283784d5eb0
203+
includes/language/dutch.php bd6a37e9d4941862c34089cc75e6868d
204+
includes/language/english.php 05b3e45e1259e0d8fb3fb8c8f0803116
205+
includes/language/estonian.php 80027fa3c3b42a975f8ab78ee96ed986
206+
includes/language/french.php abfcb426025aab4a8f011ff4ccf2e34d
207+
includes/language/german.php c6e519c304065c710106ebc65453f61e
208+
includes/language/greek.php b8dec060970ca78b6a29a597ef7bf0e2
209+
includes/language/hungarian.php 3074a33332e0226ef1f8a0979a132708
210+
includes/language/italian.php a5953eff5d6a98e7e4d4bc7dafe19bb9
211+
includes/language/japanese.php aa1808be41bdd22d3aa70d4bc2b7c27b
212+
includes/language/norwegian.php 0c69daa393292128c30aa6673b2a5726
213+
includes/language/polish.php 2f213ea90db52ea4ecce957444544082
214+
includes/language/portuguese.php 533619f17c8df5edc9084bcda8931af1
215+
includes/language/portuguese_br.php c20c459122606bde747aeda959e49452
216+
includes/language/romanian.php 7dfa8186b2726785a5dd1e3533080ceb
217+
includes/language/russian.php 70a65f28f453dce3285b268f3f4956cc
218+
includes/language/spanish.php bbb272bf68bcc456c4c6ec1303d04d11
219+
includes/language/swedish.php 5f98239af96f261415dec4515c37df00
220+
includes/language/turkish.php 5e2bc4e69a254163725bfb8758ae1314
221+
includes/language/ukrainian.php d8eecfca9a7ad9e3bac713b515e95332
222+
includes/language/vietnamese.php 645245632ad8691b59879ad071ae1396
223223
includes/libraries/cryptojs/CONTRIBUTING.md dbdfd6f23697cc7dc263b000b951d0c4
224224
includes/libraries/cryptojs/Encryption.php 4f6252cda32ff52f74d4e85113f07e87
225225
includes/libraries/cryptojs/LICENSE ae3e116844af349909de6f126e8b1fac
@@ -324,7 +324,7 @@ includes/libraries/teampassclasses/superglobal/src/SuperGlobal.php 6f55cda2cafa8
324324
includes/libraries/yubico/PEAR.php 9ab244f2c4af59a1dc59ea3f3170c186
325325
includes/libraries/yubico/Yubico.php 054fba2b44cff4cb7ac32aa61ae89b05
326326
includes/tables_integrity.json e38b484ec5eea6eba8b6554a3570eea6
327-
index.php f93f43befaa8f44bc7b7c4893766bf58
327+
index.php a98f4333b21860c518d7acdf3222181f
328328
install/css/install.css b35a835d647baf6264623b2e7b9c09f9
329329
install/css/overcast/images/animated-overlay.gif 2b912f7c0653008ca28ebacda49025e7
330330
install/css/overcast/images/ui-bg_flat_0_aaaaaa_40x100.png f8da69643f9ab01fe81c3a951ec67df9
@@ -357,7 +357,7 @@ install/install-steps/run.step1.php a60c2e61f765e9ebafc7b3f8ea0aaf51
357357
install/install-steps/run.step2.php 39bc0e5714cc404bbd60297f62ad2910
358358
install/install-steps/run.step3.php aedae1cc4680f8e48c524530a001d753
359359
install/install-steps/run.step4.php 9769f64928708599889a574e122eab0c
360-
install/install-steps/run.step5.php feb2a2d74e3b87a64435ed969319dee9
360+
install/install-steps/run.step5.php 419a58729c6739bdadd64f503b037dc3
361361
install/install-steps/run.step6.php 1165f4ddef4ca91c54a9335e536a26d1
362362
install/install.php 79dea4155acc861977f957303257982f
363363
install/js/aes.min.js deaf035d40420d4ce6d4018e0bd63801
@@ -3705,7 +3705,7 @@ sources/items.queries.php 419e5808549702f50f151ce990f9e293
37053705
sources/ldap.queries.php 8347f492f841663828410a9a72e829ac
37063706
sources/logs.datatables.php 762156d1ffdbe9970d232e8a2c9764ed
37073707
sources/main.functions.php f0cb75cc7c1bc72bc5765d9ed0776b29
3708-
sources/main.queries.php d839ac6ef372461839943c30e8f32644
3708+
sources/main.queries.php 7f76b0601f313065086b3d78b513b53a
37093709
sources/oauth.php edd9fca8b228780548f927c291670f53
37103710
sources/roles.queries.php 812d89d05969b25236a3a12124ff63c9
37113711
sources/scheduler.php f2b3bd68de593c6e8575e4ebd9a53652

includes/config/include.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
define('TP_VERSION', '3.1.4');
3030
define("UPGRADE_MIN_DATE", "1761078422");
31-
define('TP_VERSION_MINOR', '40');
31+
define('TP_VERSION_MINOR', '41');
3232
define('TP_TOOL_NAME', 'Teampass');
3333
define('TP_ONE_DAY_SECONDS', 86400);
3434
define('TP_ONE_WEEK_SECONDS', 604800);

includes/core/load.js.php

Lines changed: 91 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,79 @@
174174
}
175175
});
176176
});
177+
178+
// Show dialog to encrypt personal items after password change
179+
// Actions on modal buttons
180+
$(document).on('click', '#button_depiapc_do', function() {
181+
// Check if we have the required fields
182+
const bothFilled = $('#depiapc-previous-password').val() !== '' && $('#depiapc-current-password').val() !== '';
183+
const ignoreChecked = $('#depiapc-ignore-password').is(':checked');
184+
185+
if (!bothFilled && !ignoreChecked) {
186+
toastr.remove();
187+
toastr.error(
188+
'<?php echo $lang->get('please_fill_in_all_required_fields'); ?>',
189+
'<?php echo $lang->get('caution'); ?>', {
190+
timeOut: 5000,
191+
progressBar: true
192+
}
193+
);
194+
return false;
195+
}
196+
197+
// Show user
198+
toastr.remove();
199+
toastr.info('<?php echo $lang->get('in_progress'); ?><i class="fa-solid fa-circle-notch fa-spin fa-2x ml-3"></i>');
200+
201+
// Inform user
202+
$("#depiapc-progress").html('<b><?php echo $lang->get('in_progress'); ?> <i class="fa-solid fa-spinner fa-pulse ml-3 text-primary"></i>');
203+
$('#button_depiapc_do, #button_depiapc_close').attr('disabled', 'disabled');
204+
205+
var data = {
206+
'userPreviousPwd' : $('#depiapc-previous-password').val(),
207+
'userCurrentPwd' : $('#depiapc-current-password').val(),
208+
'skipPasswordChange' : ignoreChecked ? 1 : 0,
209+
'userId': store.get('teampassUser').user_id
210+
};
211+
// Do query
212+
$.post(
213+
"sources/main.queries.php", {
214+
'type': "user_only_personal_items_encryption",
215+
'type_category': 'action_key',
216+
'data': prepareExchangedData(JSON.stringify(data), "encode", "<?php echo $session->get('key'); ?>"),
217+
'key': '<?php echo $session->get('key'); ?>'
218+
},
219+
function(data) {
220+
data = prepareExchangedData(data, "decode", "<?php echo $session->get('key'); ?>");
221+
if (debugJavascript === true) console.log(data)
222+
if (data.error === true) {
223+
// error
224+
toastr.remove();
225+
toastr.error(
226+
data.message,
227+
'<?php echo $lang->get('caution'); ?>', {
228+
timeOut: 5000,
229+
progressBar: true
230+
}
231+
);
232+
233+
// Enable buttons
234+
$("#depiapc-progress").html('<?php echo $lang->get('an_error_occurred'); ?>');
235+
$('#button_depiapc_do, #button_depiapc_close').removeAttr('disabled');
236+
return false;
237+
} else {
238+
toastr.remove();
239+
// Enable buttons
240+
$("#depiapc-progress").html('<?php echo $lang->get('generate_new_keys_end'); ?>');
241+
$('#button_depiapc_close').removeAttr('disabled');
242+
}
243+
}
244+
);
245+
});
246+
$(document).on('click', '#button_depiapc_close', function() {
247+
$('#dialog-encryption-personal-items-after-password-change').addClass('hidden');
248+
$('.content, .content-header').removeClass('hidden');
249+
});
177250
});
178251

179252
/**
@@ -333,6 +406,12 @@ function(teampassUser) {
333406
document.location.href = "index.php?page=profile&tab=keys";
334407
});
335408
}
409+
410+
411+
if (typeof data.queryResults !== 'undefined' && data.queryResults.special !== null && data.queryResults.special === 'encrypt_personal_items_with_new_password') {
412+
showDialogEncryptPersonalItemsAfterPasswordChange();
413+
return;
414+
}
336415

337416
// Does user has personal items to encrypt?
338417
if (typeof data.queryResults !== 'undefined' && data.error === false && data.queryResults.special === 'encrypt_personal_items') {
@@ -545,63 +624,7 @@ function(data) {
545624
store.get('teampassUser').special === 'encrypt_personal_items_with_new_password'
546625
) {
547626
// If user has to re-encrypt his personal item passwords after a password change
548-
$('#dialog-encryption-personal-items-after-password-change').removeClass('hidden');
549-
$('.content, .content-header').addClass('hidden');
550-
551-
// Actions on modal buttons
552-
$(document).on('click', '#button_depiapc_do', function() {
553-
// Show user
554-
toastr.remove();
555-
toastr.info('<?php echo $lang->get('in_progress'); ?><i class="fa-solid fa-circle-notch fa-spin fa-2x ml-3"></i>');
556-
557-
// Inform user
558-
$("#depiapc-progress").html('<b><?php echo $lang->get('in_progress'); ?> <i class="fa-solid fa-spinner fa-pulse ml-3 text-primary"></i>');
559-
$('#button_depiapc_do, #button_depiapc_close').attr('disabled', 'disabled');
560-
561-
var data = {
562-
'userPreviousPwd' : $('#depiapc-previous-password').val(),
563-
'userCurrentPwd' : $('#depiapc-current-password').val(),
564-
'userId': store.get('teampassUser').user_id
565-
};
566-
// Do query
567-
$.post(
568-
"sources/main.queries.php", {
569-
'type': "user_only_personal_items_encryption",
570-
'type_category': 'action_key',
571-
'data': prepareExchangedData(JSON.stringify(data), "encode", "<?php echo $session->get('key'); ?>"),
572-
'key': '<?php echo $session->get('key'); ?>'
573-
},
574-
function(data) {
575-
data = prepareExchangedData(data, "decode", "<?php echo $session->get('key'); ?>");
576-
if (debugJavascript === true) console.log(data)
577-
if (data.error === true) {
578-
// error
579-
toastr.remove();
580-
toastr.error(
581-
data.message,
582-
'<?php echo $lang->get('caution'); ?>', {
583-
timeOut: 5000,
584-
progressBar: true
585-
}
586-
);
587-
588-
// Enable buttons
589-
$("#depiapc-progress").html('<?php echo $lang->get('an_error_occurred'); ?>');
590-
$('#button_depiapc_do, #button_depiapc_close').removeAttr('disabled');
591-
return false;
592-
} else {
593-
toastr.remove();
594-
// Enable buttons
595-
$("#depiapc-progress").html('<?php echo $lang->get('generate_new_keys_end'); ?>');
596-
$('#button_depiapc_close').removeAttr('disabled');
597-
}
598-
}
599-
);
600-
});
601-
$(document).on('click', '#button_depiapc_close', function() {
602-
$('#dialog-encryption-personal-items-after-password-change').addClass('hidden');
603-
$('.content, .content-header').removeClass('hidden');
604-
});
627+
showDialogEncryptPersonalItemsAfterPasswordChange();
605628
}
606629

607630

@@ -2305,4 +2328,15 @@ function hashUserId(userId) {
23052328
return '';
23062329
}
23072330
}
2331+
2332+
/**
2333+
* Show dialog to re-encrypt personal items after password change
2334+
*/
2335+
function showDialogEncryptPersonalItemsAfterPasswordChange() {
2336+
$('#dialog-encryption-personal-items-after-password-change').removeClass('hidden');
2337+
$('.content, .content-header').addClass('hidden');
2338+
2339+
// Remove previous event listeners before adding new ones
2340+
$('#button_depiapc_do, #button_depiapc_close').off('click');
2341+
}
23082342
</script>

includes/language/bulgarian.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,5 +1296,6 @@
12961296
'an_error_occurred' => 'An error occurred',
12971297
'attention_user_password_change' => 'Your password has changed, it is required to re-encrypt your personal items.',
12981298
'your_current_password' => 'Your current password',
1299+
'please_fill_in_all_required_fields' => 'Please fill in all required fields',
12991300

13001301
);

includes/language/catalan.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,5 +1296,6 @@
12961296
'an_error_occurred' => 'An error occurred',
12971297
'attention_user_password_change' => 'Your password has changed, it is required to re-encrypt your personal items.',
12981298
'your_current_password' => 'Your current password',
1299+
'please_fill_in_all_required_fields' => 'Please fill in all required fields',
12991300

13001301
);

includes/language/chinese.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,5 +1296,6 @@
12961296
'an_error_occurred' => 'An error occurred',
12971297
'attention_user_password_change' => 'Your password has changed, it is required to re-encrypt your personal items.',
12981298
'your_current_password' => 'Your current password',
1299+
'please_fill_in_all_required_fields' => 'Please fill in all required fields',
12991300

13001301
);

includes/language/czech.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,5 +1296,6 @@
12961296
'an_error_occurred' => 'An error occurred',
12971297
'attention_user_password_change' => 'Your password has changed, it is required to re-encrypt your personal items.',
12981298
'your_current_password' => 'Your current password',
1299+
'please_fill_in_all_required_fields' => 'Please fill in all required fields',
12991300

13001301
);

includes/language/dutch.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,5 +1296,6 @@
12961296
'an_error_occurred' => 'An error occurred',
12971297
'attention_user_password_change' => 'Your password has changed, it is required to re-encrypt your personal items.',
12981298
'your_current_password' => 'Your current password',
1299+
'please_fill_in_all_required_fields' => 'Please fill in all required fields',
12991300

13001301
);

includes/language/english.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
// - selected_items_to_be_imported
3333

3434
return array(
35+
'please_fill_in_all_required_fields' => 'Please fill in all required fields',
3536
'an_error_occurred' => 'An error occurred',
3637
'attention_user_password_change' => 'Your password has changed, it is required to re-encrypt your personal items.',
3738
'your_current_password' => 'Your current password',

includes/language/estonian.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1296,5 +1296,6 @@
12961296
'an_error_occurred' => 'An error occurred',
12971297
'attention_user_password_change' => 'Your password has changed, it is required to re-encrypt your personal items.',
12981298
'your_current_password' => 'Your current password',
1299+
'please_fill_in_all_required_fields' => 'Please fill in all required fields',
12991300

13001301
);

0 commit comments

Comments
 (0)