Bug 4374 - insert mailto URI misses checks
Summary: insert mailto URI misses checks
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Other (show other bugs)
Version: 3.17.7
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2020-08-18 20:50 UTC by Alvar Penning
Modified: 2020-08-19 08:57 UTC (History)
0 users

See Also:


Attachments
possible patch (2.09 KB, patch)
2020-08-18 20:50 UTC, Alvar Penning
no flags Details | Diff

Description Alvar Penning 2020-08-18 20:50:49 UTC
Created attachment 2077 [details]
possible patch

Claws Mail supports the undocumented "insert" field within the mailto URI. Setting this field to a valid path should result in Claws Mail setting the specific file's content as the new mail's body.

Contrary to the code for the attach functionality, there are no parameter checks. This allows the creation of an mailto URI to send, for example, /etc/passwd.

Furthermore, there is also no check if the parameter is a regular file. Passing a device results in copying all its data into memory. By selecting /dev/zero my system has hung within seconds.

A patch is attached which hopefully fixes these problems.
Comment 1 Paul 2020-08-19 08:57:02 UTC
fixed in git. thanks for that patch!

Note You need to log in before you can comment on or make changes to this bug.