TASK22028: phase 15 hash guard consistency hardening slice

This commit is contained in:
2026-03-13 16:04:31 +00:00
parent 0ca6cd94cc
commit 1a95cf1098
9 changed files with 458 additions and 11 deletions
@@ -26,7 +26,9 @@ ApiProxy.get(async (req, res) => {
typeof containerName === "undefined" ||
containerName.length === 0 ||
typeof tempCaseRef === "undefined" ||
tempCaseRef.length === 0
tempCaseRef.length === 0 ||
typeof checkHash === "undefined" ||
checkHash.length === 0
) {
return res.status(400).json();
}
+10 -10
View File
@@ -29,18 +29,18 @@ ApiProxy.get(async (req, res) => {
var checkquerypath = "/api/file/setupcontainer?ident=" + containerName;
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
await createContainer(containerName)
.then((data) => {
return res.status(200).json({ data: "success", output: data });
})
.catch((error) => {
consoleLogger(error);
res.status(400).json(error);
});
} else {
if (hashAPIPath(checkquerypath) != "&hash=" + checkHash) {
return res.status(400).json();
}
await createContainer(containerName)
.then((data) => {
return res.status(200).json({ data: "success", output: data });
})
.catch((error) => {
consoleLogger(error);
res.status(400).json(error);
});
});
export const config = {
+4
View File
@@ -14,6 +14,10 @@ ApiProxy.use(middleware);
ApiProxy.post(async (req, res) => {
var checkHash = req.query.hash;
if (typeof checkHash === "undefined" || checkHash.length === 0) {
return res.status(400).json();
}
var checkquerypath = "/api/file/upload";
if (hashAPIPath(checkquerypath) != "?hash=" + checkHash) {
+5
View File
@@ -37,6 +37,11 @@ ApiProxy.use(middleware);
ApiProxy.post(async (req, res) => {
var checkHash = req.query.hash;
if (typeof checkHash === "undefined" || checkHash.length === 0) {
return res.status(400).json();
}
var checkquerypath = "/api/file/uploadsinglefile";
if (hashAPIPath(checkquerypath) != "?hash=" + checkHash) {