Indefero

Indefero Commit Details


Date:2008-08-05 13:09:20 (16 years 4 months ago)
Author:Loic d'Anterroches
Branch:dev, develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3, svn
Commit:884a41fbba1708e8bcf0e1f5eeb72bf0898eb60b
Parents: 330fa625545b9182f1e64a8282bb08e31f83a18d
Message:Fixed to prevent overwritting an existing file.

Changes:

File differences

src/IDF/Form/Upload.php
7070
7171
7272
73
74
75
7376
7477
7578
if (!preg_match('/\.(png|jpg|jpeg|gif|bmp|psd|tif|aiff|asf|avi|bz2|css|doc|eps|gz|mdtext|mid|mov|mp3|mpg|ogg|pdf|ppt|ps|qt|ra|ram|rm|rtf|sdd|sdw|sit|sxi|sxw|swf|tgz|txt|wav|xls|xml|wmv|zip)$/i', $this->cleaned_data['file'])) {
throw new Pluf_Form_Invalid(__('For security reason, you cannot upload a file with this extension.'));
}
if (file_exists(Pluf::f('upload_path').'/'.$this->project->shortname.'/files/'.$this->cleaned_data['file'])) {
throw new Pluf_Form_Invalid(sprintf(__('A file with the name "%s" is already available for download.'), $this->cleaned_data['file']));
}
return $this->cleaned_data['file'];
}

Archive Download the corresponding diff file

Page rendered in 0.07211s using 13 queries.