Index: openacs-4/packages/acs-content-repository/tcl/revision-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/revision-procs.tcl,v diff -u -r1.32.2.3 -r1.32.2.4 --- openacs-4/packages/acs-content-repository/tcl/revision-procs.tcl 27 Oct 2016 18:02:00 -0000 1.32.2.3 +++ openacs-4/packages/acs-content-repository/tcl/revision-procs.tcl 6 Dec 2016 11:13:31 -0000 1.32.2.4 @@ -374,7 +374,17 @@ to inspect the actual file content instead of trusting the user. @return the mapped mimetype -} { +} { + # + # Check if the provided mime_type is already in our cr_mime_types + # table. If so, accept it. + # + if {$mime_type ne "*/*" && [db_0or1row check_given_mime_type { + select 1 from cr_mime_types where mime_type = :mime_type + }]} { + return $mime_type + } + # TODO: we use only the extension to get the mimetype. Something # better should be done, like inspecting the actual content of the # file and never trust the user on this regard, but as this