ananthakumaran / monky

Magit for Hg
http://ananthakumaran.in/monky/index.html
GNU General Public License v3.0
154 stars 30 forks source link

Use make-temp-file vs make-temp-name as it is not safe #54

Closed DAarno closed 6 years ago

DAarno commented 6 years ago

There is a race condition between calling ‘make-temp-name’ and later creating the file, which opens all kinds of security holes. For that reason, you should normally use ‘make-temp-file’ instead.

This also makes the code simpler as it automatically performs the expansion with temporary-file-directory.

Bounga commented 6 years ago

Good catch @DAarno. Thanks a lot.