Implemented a better handling of (partially) unsalted hashlists #1657 #1751
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


I've implemented the things @s3inlc mentioned in his comment on issue #1657.
Regarding the "report back on the hashlist creation with numbers (e.g. valid hashes: xy, invalid hashes: ab).", I went with the approach of modifying the db and adding new attributes to each hashlist (totalLines, emptyLines, validHashesWithoutExpectedSalt, validHashes and invalidHashes). Another approach would be to not store these values and only report them back to the user on the hashlist creation. But then it wouldn't be possible to display these attributes later on, like on the hashlist detail page where the number of hashes without an expected salt may be interesting.
This is how the hashlist data would now look like with the new attributes:

The counting also works if the list gets added using the old UI, but it may make sense to only add the warning about the empty/invalid/... lines in the new frontend, because the old UI will get retired eventually.
What do you think about this proposed solution?
Open questions:
Open todos:
DB change:
