Steps to reproduce
- Open Telegram Desktop.
- Open any chat.
- Paste a sufficiently large block of plain text into the message field so that Telegram offers to send it as a file.
- Select the option to send the pasted content as a file. Telegram creates an attachment named "message.txt".
- In the file preview, choose "Rename".
- Change the filename extension from ".txt" to another extension, for example ".sh".
- Confirm the rename.
- Compare this behavior with renaming a normal file attached from the filesystem: in the normal file attachment flow, the extension cannot be changed independently.
Expected behaviour
The filename extension should be handled consistently with normal file attachments. When renaming the generated "Message.txt" attachment, the ".txt" extension should either remain protected or the same extension-editing rules should be applied consistently across file attachment flows.
Actual behaviour
When renaming the file generated from pasted text, Telegram allows the ".txt" extension to be edited or completely replaced. For example, "Message.txt" can be renamed to "Message.sh".
In contrast, when renaming a normal file attached from the filesystem, Telegram allows the base filename to be changed but does not allow the extension to be changed.
Operating system
Ubuntu 24.04.4 LTS
Version of Telegram Desktop
7.1.3
Installation source
Downloaded from desktop.telegram.org or GitHub
Crash ID
No response
Logs
Steps to reproduce
Expected behaviour
The filename extension should be handled consistently with normal file attachments. When renaming the generated "Message.txt" attachment, the ".txt" extension should either remain protected or the same extension-editing rules should be applied consistently across file attachment flows.
Actual behaviour
When renaming the file generated from pasted text, Telegram allows the ".txt" extension to be edited or completely replaced. For example, "Message.txt" can be renamed to "Message.sh".
In contrast, when renaming a normal file attached from the filesystem, Telegram allows the base filename to be changed but does not allow the extension to be changed.
Operating system
Ubuntu 24.04.4 LTS
Version of Telegram Desktop
7.1.3
Installation source
Downloaded from desktop.telegram.org or GitHub
Crash ID
No response
Logs