4 ms·
> why go through all the trouble of reinventing the wheel? Because now you depend on an UUID library and its attack surface. In some environments it is crucia
by danuker 5y ago
> why go through all the trouble of reinventing the wheel?
Because now you depend on an UUID library and its attack surface.
In some environments it is crucial to reduce dependencies.
- wizhi 5y ago>Because now you depend on an UUID library and its attack surface. I can appreciate reducing dependencies, but this is bordering on paranoia.
- danuker 5y agoWhenever there's a "parse" method (as shown in this article), there's the possibility of poor implementation and exploitability.
- toomanydoubts 5y agoSorry, I do not get your point. If your inputs come from outside your system, you have to sanitize them, period. It would be the same thing for the original poster of this thread if the ids are being generated client-side. Besides, you're also running the risk of poor implementation for an ad-hoc system, which in my opinion is order of magnitudes larger than using a battle tested algorithm.
- fabian2k 5y agoYou can generate the UUID in the database. And UUID generation is something that you can also find in the standard library quite often, in both those cases you don't need to add an additional dependency.
- Akronymus 5y agoYeah, UUID generation should be from the DB. Have a stored procedure for putting creating the record and return the UUID from that, rather than it being provided from outside.
- dtech 5y agoUUID is part of your language stdlib, or at least there will be widely tested dependencies for the formats. Are you that certain about the parser of your own custom format?...