]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Merge remote-tracking branch 'origin/master'
authorSimon McVittie <smcv@debian.org>
Mon, 15 Sep 2014 20:12:43 +0000 (21:12 +0100)
committerSimon McVittie <smcv@debian.org>
Mon, 15 Sep 2014 20:12:43 +0000 (21:12 +0100)
IkiWiki/Plugin/filecheck.pm
debian/changelog
doc/bugs/can__39__t_upload_a_simple_png_image:_prohibited_by_allowed__95__attachments___40__file_MIME_type_is_application__47__octet-stream....mdwn

index cdea5c706f4085686bf20b5e7a09283792137c31..6e65283983b472fe26c86351fb6572ec5ae51865 100644 (file)
@@ -150,7 +150,7 @@ sub match_mimetype ($$;@) {
                chomp $mimetype;
                close $file_h;
        }
-       if (! defined $mimetype || $mimetype !~s /;.*//) {
+       if (! defined $mimetype) {
                # Fall back to default value.
                $mimetype=File::MimeInfo::Magic::default($file)
                        if $mimeinfo_ok;
@@ -158,6 +158,8 @@ sub match_mimetype ($$;@) {
                        $mimetype="unknown";
                }
        }
+       # Ignore any parameters, we only want the type itself
+       $mimetype =~ s/;.*//;
 
        my $regexp=IkiWiki::glob2re($wanted);
        if ($mimetype!~$regexp) {
index b50b515b0d0fc3cc83f1694d83695d8a423febe7..07b4339e59b8a1ad8f37a039e5eb9af92c856539 100644 (file)
@@ -22,6 +22,7 @@ ikiwiki (3.20140912) UNRELEASED; urgency=medium
     before executing Perl code, so that PERL5LIB can point to a
     non-system-wide installation of IkiWiki.
     Thanks, Lafayette Chamber Singers Webmaster
+  * filecheck: accept MIME types not containing ';'
 
  -- Simon McVittie <smcv@debian.org>  Fri, 12 Sep 2014 21:23:58 +0100
 
index 627b2c82764de62be9f2609e686a58665645fffc..e179f09c809f4dd0f081fc604e152b7160cd249b 100644 (file)
@@ -89,3 +89,7 @@ Weird... --[[anarcat]]
 > > > > > > I've turned the version I suggested above into a proper branch.
 > > > > > > Review by someone who can commit to ikiwiki.git would be appreciated.
 > > > > > > --[[smcv]]
+
+> > > > > > > Turns out "someone who can commit" includes me.
+> > > > > > > [[Merged|done]] this version, we can revert or alter it if
+> > > > > > > Joey remembers a reason to require `;` --[[smcv]]