files in dangerzone/processing silently block sanitization
when we have (say) file FOOBAR in dangerzone/processing/FOOBAR, it blocks processing of file FOOBAR, which just stays stuck there, which leaves people to believe dangerzone-bot is stuck (e.g. #17 (closed)). this is confusing, and while it can happen during a crash (e.g. #14), it can also happen during reboots (!) which is probably what happened in #17 (closed).
so we need to handle this situation better: at the very least we need to have better feedback for the operator, because i couldn't figure out what was going on just by looking at the logs:
Dec 03 17:23:26 dangerzone-01 systemd[1]: Starting Dangerzone WebDAV processor...
Dec 03 17:23:26 dangerzone-01 dangerzone-webdav-processor[2491]: authenticated with webdav https://nc.torproject.net/remote.php/dav/files/dangerzone-bot/
Dec 03 17:23:31 dangerzone-01 dangerzone-webdav-processor[2491]: sanitizing CVs (4)/ Candidate 33/
Dec 03 17:23:32 dangerzone-01 dangerzone-webdav-processor[2491]: sanitizing CVs (4)/ Candidate 35/
Dec 03 17:23:37 dangerzone-01 systemd[1]: dangerzone-webdav-processor.service: Succeeded.
Dec 03 17:23:37 dangerzone-01 systemd[1]: Started Dangerzone WebDAV processor.
notice those "sanitizing" messages there? those are confusing too, and unrelated. i have been staring at those three lines of code for a while now:
logging.info("sanitizing %s %s", folder, path)
# non-empty folder or regular file
if len(listing) > 1 or not path.endswith("/"):
i cannot fathom what the logic is in there. we'd need to look at those actual folders to see what's going on, but it could be just a distraction from this issue.