-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow an option to choose the hashing algorithm #374
Comments
Hi, sure, go ahead. |
@barucoh Sorry for my delay. I just go back in from a 2 week vacation. Kind of bad timing on my part for opening the issue, but I didn't know how responsive the author/maintainer would be. 😇 I'm going to work it today, and try to have something up soon. I am curious why that PR you found from 4 years ago didn't make the cut. |
- hashAlgorithm key added to DEFAULT_OPTIONS - hashAlgorithm key can be overriden by value given in options argument - buildOptions function will ensure a default a hashAlgorithm exists, and throw an error if the provided option is not supported by the system. - throws early error during app setup, rather than waiting until an upload is attempted - memHandler and tempFileHandler use the hashAlgorithm option now - Updated tests for buildOptions function in utilities.spec.js ref: richardgirges#374
@RomanBurunkov PR is up for review. Let me know if something isn't to your liking. All tests are passing. |
Hi @Kpovoc I checked a PR, please check my comments on it. Leaving the md5 prop name, I would consider as a tradeoff between new feature and backward compatibility. |
@RomanBurunkov I have addressed your comments as I understood them, and updated the README with your suggestions here. I agree with leaving the md5 prop name for backward compatibility. Also, I iterated the version number on the package.json. I wasn't sure if this way something I needed to do, or if it was something that would automatically happen in the build pipeline. |
@RomanBurunkov Gentle reminder that I am awaiting feedback or a merge in my PR. Thank you for your time and attention. Hope all is well. |
PR #375 merged and new version published. |
For whom it may concern, I added this to DefinitelyTyped to be supported in TypeScript |
Hi! First of all, thank you for all of your hard work! This module is super useful, and makes file-upload a breeze.
The Issue
My team is using this module in an app running in a restricted environment. FIPS compliant algorithms are strictly enforced, and this is causing an error when express-fileupload uses MD5 to hash the temporary files.
The Suggestion
I think a good solution would be adding a hashing-algorithm option to the setup, to be used instead of a hard-coded 'md5'.
I don't mind doing the work and putting in a PR, but I wanted to make an issue first to see if this solution was a desired one.
Thank you for your time!
The text was updated successfully, but these errors were encountered: