test: align container flow acceptance identities
This commit is contained in:
@@ -72,11 +72,17 @@ export async function run(context) {
|
||||
['evidenceId', 'fileId', 'status', 'downloadPath'].every((field) => photo[field] !== undefined),
|
||||
`fileId=${id(photo.fileId)}`, OPTIONS)
|
||||
const downloadPath = String(photo.downloadPath || '')
|
||||
if (photo.status === 'VOID') {
|
||||
context.assert(MODULE, `overview PDA 作废照片 ${index + 1} 无下载入口`, overviewResponse,
|
||||
!downloadPath,
|
||||
`fileId=${id(photo.fileId)}, status=${photo.status}, downloadPath=${downloadPath || 'none'}`, OPTIONS)
|
||||
continue
|
||||
}
|
||||
const controlledPath = downloadPath.startsWith('/api/')
|
||||
&& !downloadPath.startsWith('//') && !downloadPath.includes('://')
|
||||
if (!controlledPath) {
|
||||
if (photo.status !== 'ACTIVE' || !controlledPath) {
|
||||
context.assert(MODULE, `overview PDA 照片 ${index + 1} 下载路径受控`, overviewResponse, false,
|
||||
`fileId=${id(photo.fileId)}, downloadPath=${downloadPath || 'missing'}`, OPTIONS)
|
||||
`fileId=${id(photo.fileId)}, status=${photo.status || 'missing'}, downloadPath=${downloadPath || 'missing'}`, OPTIONS)
|
||||
continue
|
||||
}
|
||||
const download = await context.requestBinary('GET', downloadPath)
|
||||
|
||||
Reference in New Issue
Block a user