Skip to content

Commit 5f07632

Browse files
committed
dev-demo: generate "secret_field" when autofill database
AdminForth/1731/security-audit
1 parent 5553a5e commit 5f07632

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

dev-demo/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ if (fileURLToPath(import.meta.url) === path.resolve(process.argv[1])) {
414414
listed: i % 2 == 0,
415415
mileage: Math.floor(Math.random() * 200000),
416416
body_type: BODY_TYPES[Math.floor(Math.random() * BODY_TYPES.length)].value,
417+
secret_field: `secret_${i}`,
417418
});
418419
};
419420
}
@@ -430,6 +431,7 @@ if (fileURLToPath(import.meta.url) === path.resolve(process.argv[1])) {
430431
listed: i % 2 == 0,
431432
mileage: Math.floor(Math.random() * 200000),
432433
body_type: BODY_TYPES[Math.floor(Math.random() * BODY_TYPES.length)].value,
434+
secret_field: `secret_${i}`,
433435
});
434436
};
435437
}
@@ -447,6 +449,7 @@ if (fileURLToPath(import.meta.url) === path.resolve(process.argv[1])) {
447449
listed: i % 2 == 0,
448450
mileage: Math.floor(Math.random() * 200000),
449451
body_type: BODY_TYPES[Math.floor(Math.random() * BODY_TYPES.length)].value,
452+
secret_field: `secret_${i}`,
450453
});
451454
};
452455
}
@@ -464,6 +467,7 @@ if (fileURLToPath(import.meta.url) === path.resolve(process.argv[1])) {
464467
listed: i % 2 == 0,
465468
mileage: Math.floor(Math.random() * 200000),
466469
body_type: BODY_TYPES[Math.floor(Math.random() * BODY_TYPES.length)].value,
470+
secret_field: `secret_${i}`,
467471
});
468472
};
469473
}
@@ -481,6 +485,7 @@ if (fileURLToPath(import.meta.url) === path.resolve(process.argv[1])) {
481485
listed: i % 2 == 0,
482486
mileage: Math.floor(Math.random() * 200000),
483487
body_type: BODY_TYPES[Math.floor(Math.random() * BODY_TYPES.length)].value,
488+
secret_field: `secret_${i}`,
484489
});
485490
};
486491
}

0 commit comments

Comments
 (0)