TASK22224: big parity bundle for completion message routes
This commit is contained in:
@@ -2,7 +2,6 @@ import {
|
||||
downloadAllProgressFiles,
|
||||
getAllProgressBlobs
|
||||
} from "../../../actions/azurestorage";
|
||||
import _ from "lodash";
|
||||
import nextConnect from "next-connect";
|
||||
import middleware from "../middleware/middleware";
|
||||
import { hashAPIPath } from "../../../actions/core/hash";
|
||||
@@ -28,10 +27,17 @@ ApiProxy.get(async (req, res) => {
|
||||
});
|
||||
}
|
||||
|
||||
const checkquerypath =
|
||||
"/api/file/getawaitingsubmissionfromblob?container=" + containerName;
|
||||
const hashCandidatePaths = [
|
||||
"/api/file/getawaitingsubmissionfromblob?container=" + containerName,
|
||||
"/api/file/getawaitingsubmissionfromblob?container=" +
|
||||
encodeURIComponent(containerName)
|
||||
];
|
||||
|
||||
if (hashAPIPath(checkquerypath) != "&hash=" + checkHash) {
|
||||
const isHashValid = hashCandidatePaths.some(
|
||||
(candidatePath) => hashAPIPath(candidatePath) == "&hash=" + checkHash
|
||||
);
|
||||
|
||||
if (!isHashValid) {
|
||||
return respondError(res, {
|
||||
status: 400,
|
||||
code: "INVALID_HASH",
|
||||
|
||||
Reference in New Issue
Block a user