TASK22019: phase 13 harden delete and involvement guards
This commit is contained in:
@@ -19,7 +19,9 @@ ApiProxy.get(async (req, res) => {
|
||||
typeof casefolderID === "undefined" ||
|
||||
casefolderID.length === 0 ||
|
||||
typeof repfile === "undefined" ||
|
||||
repfile.length === 0
|
||||
repfile.length === 0 ||
|
||||
typeof checkHash === "undefined" ||
|
||||
checkHash.length === 0
|
||||
) {
|
||||
return res.status(400).json();
|
||||
}
|
||||
@@ -32,14 +34,16 @@ ApiProxy.get(async (req, res) => {
|
||||
"&repfile=" +
|
||||
repfile;
|
||||
|
||||
if (hashAPIPath(checkquerypath) != "&hash=" + checkHash) {
|
||||
return res.status(400).json();
|
||||
}
|
||||
|
||||
casefolderID = casefolderID + "/" + repfile;
|
||||
|
||||
if (hashAPIPath(checkquerypath) == "&hash=" + checkHash) {
|
||||
await deleteBlobRep(containerName, casefolderID).then((data) => {
|
||||
return res.status(200).json({ data: data });
|
||||
});
|
||||
} else {
|
||||
return res.status(400).json();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user