Skip to content

Commit 04f4e4b

Browse files
Merge pull request #4392 from nilsteampassnet/vulnerability-install-sql-injection
Vulnerability during install
2 parents de5ca17 + bb21eac commit 04f4e4b

File tree

6 files changed

+335
-231
lines changed

6 files changed

+335
-231
lines changed

includes/config/include.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
define('TP_VERSION', '3.1.2');
3030
define("UPGRADE_MIN_DATE", "1727110744");
31-
define('TP_VERSION_MINOR', '131');
31+
define('TP_VERSION_MINOR', '134');
3232
define('TP_TOOL_NAME', 'Teampass');
3333
define('TP_ONE_DAY_SECONDS', 86400);
3434
define('TP_ONE_WEEK_SECONDS', 604800);

includes/tables_integrity.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
},
1414
{
1515
"table_name": "background_tasks",
16-
"structure_hash": "c3b96e3d6b07ca079266f59370af356e84848c6863aaa3662f06ffaf42b65b55"
16+
"structure_hash": "824ea4c3db1b930b8655191a54d6c09415fca3e0c104117da14ecaa924f05c06"
1717
},
1818
{
1919
"table_name": "background_tasks_logs",
20-
"structure_hash": "95925613dcdd22f045680f9c337725bdfe34c1f12ffbbc77aff7afbd06cd21a6"
20+
"structure_hash": "8825f1d0e45b66d4245eb0a7d9d8e0937c504110294ff7e2774511ccc67c5c9b"
2121
},
2222
{
2323
"table_name": "cache",
24-
"structure_hash": "d11037afa64b847d341c467132588bc1fb49d6a7f59764103485720c753c1266"
24+
"structure_hash": "a5988fbb32009d30106453eb5434d90b1f10135fb988fb3736bbf5fa254a39db"
2525
},
2626
{
2727
"table_name": "cache_tree",
@@ -57,15 +57,15 @@
5757
},
5858
{
5959
"table_name": "items",
60-
"structure_hash": "0e88a81eda19ffe8f6bf035f2853e645f888bdc350150875179a97917e02a627"
60+
"structure_hash": "af8b6e0e7bf0fe17a709bba14dca6c7833ddf2f6e0a1e91acd0a5cf5ffb4e22d"
6161
},
6262
{
6363
"table_name": "items_change",
6464
"structure_hash": "1560c119b0aa9a2e983fbf56ad584da6fd8e35517fdbd9c1144e6144a35512dd"
6565
},
6666
{
6767
"table_name": "items_edition",
68-
"structure_hash": "427adb445bc9dfca2d50c769d0667c4f21bff7c601cf97bb5f1b0c0c52e452cc"
68+
"structure_hash": "cf58c1c9b678dc0ece44492639d3c3bd23e095e69f8f65e7df67d147f90eb3b4"
6969
},
7070
{
7171
"table_name": "items_otp",
@@ -97,11 +97,11 @@
9797
},
9898
{
9999
"table_name": "log_items",
100-
"structure_hash": "bd6960c43399a81559a8ff6feb0c924421f7aa6c456241c00ccb3ba0cb75def6"
100+
"structure_hash": "470b020e4d7578366bf8299b3fd14c9a4681057a77dc018587ba08a24a6be7bb"
101101
},
102102
{
103103
"table_name": "log_system",
104-
"structure_hash": "f20b028189d86bbc95e4d55ff4b1676895e62c62e0f39296449a6c8ae8541357"
104+
"structure_hash": "8e396ef59c43500907160db66b009e41e29c6ed9d9a6aa8e324abd31be0d5777"
105105
},
106106
{
107107
"table_name": "misc",
@@ -169,7 +169,7 @@
169169
},
170170
{
171171
"table_name": "sharekeys_items",
172-
"structure_hash": "f033299e24b9eb873d03c38084a55d866971d70f06d701b42e2d744b355a2818"
172+
"structure_hash": "eedece29bce054b48d0f5525a6349072a6f9aec1a234c9980c36d6077fadaa75"
173173
},
174174
{
175175
"table_name": "sharekeys_logs",

install/install.js

+8-31
Original file line numberDiff line numberDiff line change
@@ -189,19 +189,6 @@ function checkPage()
189189
.prop("disabled", true)
190190
.addClass("hidden");
191191
}
192-
193-
/*
194-
* Removing automatic action
195-
// Go to next step
196-
if (step <= 6) {
197-
setTimeout(
198-
function(){
199-
$('#but_next').trigger('click');
200-
},
201-
1000
202-
);
203-
}
204-
*/
205192
}
206193
});
207194
} else if (error === "" && multiple === "") {
@@ -228,7 +215,7 @@ function checkPage()
228215
complete : function(data){
229216
data = $.parseJSON(data.responseText);
230217

231-
if (data[0].error !== "" ) {
218+
if (data[0].error !== "") {
232219
alertify
233220
.error('<i class="fas fa-ban mr-2"></i>Next ERROR occurred: <i>' + data[0].error + '</i><br />Please correct and relaunch.', 0)
234221
.dismissOthers();
@@ -246,19 +233,6 @@ function checkPage()
246233
.prop("disabled", false)
247234
.removeClass("hidden");
248235
}
249-
250-
/*
251-
* Removing automatic action
252-
// Go to next step
253-
if (step <= 6) {
254-
setTimeout(
255-
function(){
256-
$('#but_next').trigger('click');
257-
},
258-
1000
259-
);
260-
}
261-
*/
262236
}
263237
});
264238
} else {
@@ -282,7 +256,7 @@ function doGetJson(task)
282256
async: false,
283257
data : {
284258
type: "step_"+step,
285-
data: aesEncrypt(dataToUse), //
259+
data: aesEncrypt(dataToUse), //
286260
activity: aesEncrypt(tsk[0]),
287261
task: aesEncrypt(tsk[1]),
288262
db: aesEncrypt(JSON.stringify(dbInfo)),
@@ -292,7 +266,7 @@ function doGetJson(task)
292266
}
293267
})
294268
.complete(function(data) {
295-
console.log("\n\n--- RECEPTION---\n"+data+"\n-------\n")
269+
console.log("\n\n--- RECEPTION---\n"+JSON.stringify(data, null, 2)+"\n-------\n")
296270
if (data.responseText === "") {
297271
alertify
298272
.error('<i class="fas fa-ban mr-2">[ERROR] Answer from server is empty.', 10)
@@ -320,8 +294,11 @@ function doGetJson(task)
320294
}
321295
} else {
322296
$("#res"+step+"_check"+data[0].index).html('<span class="badge badge-danger"><i class="fas fa-ban text-warning mr-2"></i>' + data[0].error + "</i></span>");
323-
324-
global_error_on_query = true;
297+
298+
// Considere only a warning on GMP extension
299+
if (data[0].index !== "16") {
300+
global_error_on_query = true;
301+
}
325302
}
326303
}
327304
index++;

install/install.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@
434434
echo '
435435
<div id="footer">
436436
<div style="width:500px; font-size:16px;">
437-
' . TP_TOOL_NAME . ' ' . TP_VERSION . ' <i class="far fa-copyright"></i> copyright 2009-2019
437+
' . TP_TOOL_NAME . ' ' . TP_VERSION . ' <i class="far fa-copyright"></i> copyright 2009-'.date('Y').'
438438
</div>
439439
<div style="float:right;margin-top:-15px;">
440440
</div>

0 commit comments

Comments
 (0)