Skip to content

Commit

Permalink
upload-queue: give up if item cannot be decrypted
Browse files Browse the repository at this point in the history
If we have changed passwords (for example), the items in the upload queue
are no longer decryptable.  To avoid getting stuck retrying the same item
continuously, move it to the junk folder.

Signed-off-by: Bob Copeland <[email protected]>
  • Loading branch information
Bob Copeland committed Jan 4, 2016
1 parent 0b938d9 commit 8b3b0f6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions upload-queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ static char *upload_queue_next_entry(unsigned const char key[KDF_HASH_LEN], char
config_write_encrypted_string(*lock, pidstr, key);
result = config_read_encrypted_string(*name, key);
if (!result) {
/* could not decrypt: drop this file */
upload_queue_drop(*name);
config_unlink(*lock);
return NULL;
}
Expand Down

0 comments on commit 8b3b0f6

Please sign in to comment.