quickapps / cms

Modular CMS powered by CakePHP
GNU General Public License v3.0
164 stars 69 forks source link

upload file extension #77

Closed Gabri closed 12 years ago

Gabri commented 12 years ago

I add a File field and set the extension field to "kml". When I upload the kml file it append ".txt" to the name of the file ...why?

quickapps commented 12 years ago

Oh, I think it's caused by the Upload class.

Gabri commented 12 years ago

I have the same rusult as before, always added a .txt at the end

quickapps commented 12 years ago

Hm, this should work: 7fb80a6f9c558b03d96b18a00de1ae6e5665dde5

But you should use it with caution. Now any ".php" wont be turned into ".php.txt", allowing to execute malicious code.

Gabri commented 12 years ago

Ok, it works; but if you think it could be riskful ...feel free to change it again as it was before!

quickapps commented 12 years ago

Nah, I think it's okay. Site administrators should take care of this when assigning permissions.