32f11e5b39a503488aa2ee30dd98ce3228fc0791
formatGeneratedNumber() passed the admin-supplied {SEQ:N} width straight
into String.padStart() with no upper bound. A careless or malicious
format value (e.g. {SEQ:999999999}) would try to allocate a
correspondingly huge string - on the backend that runs on every single
honey-batch/bottling creation once such a format is saved, and in the
newly added frontend preview it would run on every keystroke while
typing the format. Caps the effective width at 20 digits, far beyond
any realistic sequence number, in both the backend implementation and
its frontend port so they stay identical.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Description
ApiCore - Imkereidokumentationssoftware
https://apicore.encry.de/
9 MiB
0 Stars
1 Watchers
0 Forks
Languages
TypeScript
98.1%
JavaScript
1.1%
Python
0.3%
CSS
0.3%
PLpgSQL
0.1%