core: import: update pid regex

pull/588/head
undefined 1 year ago
parent 20d14f9552
commit baac092cd8
No known key found for this signature in database

@ -442,7 +442,7 @@ export class ProblemModel {
if (!pdoc) continue;
let pid = pdoc.pid;
if (pid) {
if (!(/^[A-Za-z]+[0-9]*$/.test(pid))) pid = undefined;
if (!(/^[A-Za-z]+[0-9A-Za-z]*$/.test(pid))) pid = undefined;
else if (await ProblemModel.get(domainId, pid)) pid = undefined;
}
const overrideContent = findOverrideContent(path.join(tmpdir, i));

Loading…
Cancel
Save