Signal-Android
Signal-Android copied to clipboard
PNG -> scaled JPEG attachment -> saves with ".png" extension
When sending a media message with a PNG attachment, Signal converts the PNG to JPEG (and scales it) before sending. Later, when choosing to save the image from the conversation, this JPEG is saved with a ".png" extension. This occurs because Attachment#updateAttachmentData replaces the attachment data stream without updating the attachment content type.
Steps to reproduce
- Take a completely unamusing screenshot (PNG) to send to a contact
- Open Signal
- Open the conversation with said contact
- Tap the Attach button
- Tap the Image button
- Select the new screenshot from the documents provider
- Observe the draft media message with thumbnail
- Tap the Send button
- Wait for the media message progress to complete (converting to JPEG, scaling, sending)
- Long press the media message
- Tap the Save button
- Reluctantly embrace the security warning
- Observe the new
Signal-yyyy-mm-dd-hhmmss.pngin/sdcard/Pictures adb pullthis curious file and check check it- Behold, a JPEG in disguise
Device info: Nexus 5, stock Android 6.0 MRA58K, Signal 3.5.0 (473e470)
App state: Signal registered, SMS enabled, default SMS app