FlowCrypt / flowcrypt-browser

FlowCrypt Browser extension for Chrome and Firefox
https://flowcrypt.com
Other
372 stars 48 forks source link

Public key-encrypted message named after "noname" didn't recognized as encrypted message based on its content #5726

Closed martgil closed 1 month ago

martgil commented 1 month ago

Description

We received a report send to flowcrypt compatibility account about a Public key-encrypted message attachment named after "noname" and another "noname" file where it contains Version: 1. The application used the Canary Mail.

The issue produces a seemingly blank page:

image

The noname file attachment content:

image

Reference: https://mail.google.com/mail/u/flowcrypt.compatibility@gmail.com/#inbox/FMfcgzGxTFXMFnDNbgknpqvXKtSmMgSK

martgil commented 1 month ago

We should be able to recognize each file based on their content types but upon checking, we somehow defaults the attachment type to application/octet-stream but didn't know the reason why so completely yet.

https://github.com/FlowCrypt/flowcrypt-browser/blob/d4b2b95eff990a8db5a27d99e783c4a7a186e3dc/extension/js/common/core/attachment.ts#L75

image

sosnovsky commented 1 month ago

application/octet-stream is a default mime type for unknown files, so for cases when we don't have any file type set - application/octet-stream is used

martgil commented 1 month ago

Thanks, Roma - that is right, I knew it later on right after. I'll have more information to add here when needed.