Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Mediawiki

Uploading Files

 

 

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded


pv0001 at dynapic

Sep 24, 2009, 2:58 AM

Post #1 of 2 (783 views)
Permalink
Uploading Files

Hello,

I have problems to upload some types of files

LocalSettings.php:

$wgCheckFileExtensions = false;
$wgStrictFileExtensions = false;
$wgVerifyMimeType = false;
$wgFileExtensions = array( '7z', 'zip', 'rar', 'exe', 'gif', 'jpeg',
'jpg', 'png', 'odp', 'ods', 'odt', 'pdf' );

I could upload 'gif', 'jpg', 'png', 'pdf', 'ods', 'odt' ... etc. but
not 'exe' and some times 'zip'

Every attempt to upload an .exe gives an error

"„.exe“ ist ein nicht erlaubtes Dateiformat. Erlaubt sind die
Dateiformate: 7z, zip, rar, exe, gif, jpeg, jpg, png, odp, ods, odt, pdf."

works:
rac-exe.zip
rac.odt.zip
rac.ods.odt.odt
rac.ods.zip.odt

works *not*:
rac.exe -- reports „.exe“ not allowed
rac.exe.zip -- reports „.zip“ not allowed
rac.ods.exe.odt -- reports „.odt“ not allowed


Why does MW checks extensions if I explicitly say
"$wgCheckFileExtensions = false"?

It seems that a file with an an embedded "exe" part could not be uploaded!

Thanks for any hint,
Peter

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


roman at jct

Sep 24, 2009, 3:32 AM

Post #2 of 2 (763 views)
Permalink
Re: Uploading Files [In reply to]

There are some file types that the Wiki developers considered too
dangerous to allow to upload.  So they're not allowed even if you
think you've configured it to "allow everything".  I don't know enough
to defend or criticize this decision, but I assume the developers know
what they're doing.

This includes Open Office files.  I'll bet it includes anything with XML.

I designated a place covered by an apache server to place such files,
then defined a template to take the file name & convert it to the
appropriate link.  That way, if I move the location, I can just update
the template.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Haim (Howard) Roman
Computer Center, Jerusalem College of Technology
Phone: 052-8-592-599 (6022 from within Machon Lev)


On Thu, Sep 24, 2009 at 12:58, Peter Velan <pv0001 [at] dynapic> wrote:
>
> I have problems to upload some types of files
>
> LocalSettings.php:
>
> $wgCheckFileExtensions = false;
> $wgStrictFileExtensions = false;
> $wgVerifyMimeType = false;
> $wgFileExtensions = array( '7z', 'zip', 'rar', 'exe', 'gif', 'jpeg',
> 'jpg', 'png', 'odp', 'ods', 'odt', 'pdf' );
>
> I could upload 'gif', 'jpg', 'png', 'pdf', 'ods', 'odt' ... etc. but
> not 'exe' and some times 'zip'
>
> Every attempt to upload an .exe gives an error
>
> "„.exe“ ist ein nicht erlaubtes Dateiformat. Erlaubt sind die
> Dateiformate: 7z, zip, rar, exe, gif, jpeg, jpg, png, odp, ods, odt, pdf."
>
> works:
> rac-exe.zip
> rac.odt.zip
> rac.ods.odt.odt
> rac.ods.zip.odt
>
> works *not*:
> rac.exe -- reports „.exe“ not allowed
> rac.exe.zip -- reports „.zip“ not allowed
> rac.ods.exe.odt -- reports „.odt“ not allowed
>
>
> Why does MW checks extensions if I explicitly say
> "$wgCheckFileExtensions = false"?
>
> It seems that a file with an an embedded "exe" part could not be uploaded!
>
> Thanks for any hint,
> Peter

_______________________________________________
MediaWiki-l mailing list
MediaWiki-l [at] lists
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Wikipedia mediawiki RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.