[BUG]: Hard failure when importing file that isn't world-readable
Version Information
0.14.6
Hashcat
No response
Description
I downloaded some wordlist.txt.tar.gz, extracted it, and copied it to the Docker container with docker cp wordlist.txt hashtopolis-backend:/usr/local/share/hashtopolis/import/.
However, my user was the file owner and the permissions were 0600, so the hashtopolis server wasn't able to read the file. The file size in the list appears as "-1.0 B".
If you try to import the file anyway (e.g. when importing a list of files), it results in an HTTP 500 error, and any remaining files are not imported.
However, the biggest problem is that the file is copied and kept, even though it can't be read. So it becomes impossible to re-import a file with the same name later, since it already exists. You get the error message: "Failed to copy file wordlist.txt to the right place! File already exists!"
The file then needs to be deleted from /usr/local/share/hashtopolis/files/ before it can be imported again.