Skip to content

Commit

Permalink
Use explicit allowlist setting for story receive
Browse files Browse the repository at this point in the history
Co-authored-by: Josh Perez <60019601+josh-signal@users.noreply.github.com>
  • Loading branch information
automated-signal and josh-signal committed Nov 2, 2022
1 parent ec3b531 commit 83c59ca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ts/textsecure/MessageReceiver.ts
Expand Up @@ -116,7 +116,6 @@ import { areArraysMatchingSets } from '../util/areArraysMatchingSets';
import { generateBlurHash } from '../util/generateBlurHash';
import { TEXT_ATTACHMENT } from '../types/MIME';
import type { SendTypesType } from '../util/handleMessageSend';
import { isConversationAccepted } from '../util/isConversationAccepted';
import { getStoriesBlocked } from '../util/stories';

const GROUPV1_ID_LENGTH = 16;
Expand Down Expand Up @@ -1377,10 +1376,12 @@ export default class MessageReceiver
envelope.sourceUuid || envelope.source
);
if (
(!sender || !isConversationAccepted(sender.attributes)) &&
(!sender || !sender.get('profileSharing')) &&
(isStoryReply || isStory)
) {
log.warn(`${logId}: Dropping story message - !accepted for sender`);
log.warn(
`${logId}: Dropping story message - !profileSharing for sender`
);
this.removeFromCache(envelope);
return { plaintext: undefined, envelope };
}
Expand Down

0 comments on commit 83c59ca

Please sign in to comment.