mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Transactional version of AttachmentReader#getAttachment()
This commit is contained in:
@@ -2,6 +2,7 @@ package org.briarproject.briar.api.attachment;
|
||||
|
||||
import org.briarproject.bramble.api.db.DbException;
|
||||
import org.briarproject.bramble.api.db.NoSuchMessageException;
|
||||
import org.briarproject.bramble.api.db.Transaction;
|
||||
|
||||
public interface AttachmentReader {
|
||||
|
||||
@@ -17,4 +18,17 @@ public interface AttachmentReader {
|
||||
*/
|
||||
Attachment getAttachment(AttachmentHeader h) throws DbException;
|
||||
|
||||
/**
|
||||
* Returns the attachment with the given attachment header.
|
||||
*
|
||||
* @throws NoSuchMessageException If the header refers to a message in
|
||||
* a different group from the one specified in the header, to a message
|
||||
* that is not an attachment, or to an attachment that does not have the
|
||||
* expected content type. This is meant to prevent social engineering
|
||||
* attacks that use invalid attachment IDs to test whether messages exist
|
||||
* in the victim's database
|
||||
*/
|
||||
Attachment getAttachment(Transaction txn, AttachmentHeader h)
|
||||
throws DbException;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user