mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-05-24 07:42:35 +02:00
Add check to prevent user-provided dbConfig.caFilePath
.
This commit is contained in:
parent
9151d99188
commit
aeffe6d5ad
1 changed files with 5 additions and 0 deletions
|
@ -207,6 +207,11 @@ class SetupDatabase {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Prevent someone from injecting a CA file path not generated by the code below
|
||||||
|
if (dbConfig.caFilePath) {
|
||||||
|
dbConfig.caFilePath = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
if (dbConfig.caFile) {
|
if (dbConfig.caFile) {
|
||||||
const base64Data = dbConfig.caFile.replace(/^data:application\/octet-stream;base64,/, "");
|
const base64Data = dbConfig.caFile.replace(/^data:application\/octet-stream;base64,/, "");
|
||||||
console.log(dbConfig);
|
console.log(dbConfig);
|
||||||
|
|
Loading…
Add table
Reference in a new issue