This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libfile-mimeinfo-perl.

commit 319498b77247e21417c274238fcbb8124a6f5862
Author: gregor herrmann <gre...@debian.org>
Date:   Mon Mar 31 21:38:00 2014 +0200

    Add patch to escape MIME types before using them in regexps.
    
    Thanks: brian m. carlson for the patch.
    Closes: #690344
---
 ...001-Properly-escape-MIME-types-containing.patch | 41 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 42 insertions(+)

diff --git a/debian/patches/0001-Properly-escape-MIME-types-containing.patch 
b/debian/patches/0001-Properly-escape-MIME-types-containing.patch
new file mode 100644
index 0000000..be68097
--- /dev/null
+++ b/debian/patches/0001-Properly-escape-MIME-types-containing.patch
@@ -0,0 +1,41 @@
+Bug-Debian: http://bugs.debian.org/690334
+Bug:  https://github.com/mbeijen/File-MimeInfo/issues/3
+Forwarded:  https://github.com/mbeijen/File-MimeInfo/issues/3
+
+From 7ae0f8640dde7316b42db4874c9ccc6fed9d7940 Mon Sep 17 00:00:00 2001
+From: "brian m. carlson" <sand...@crustytoothpaste.net>
+Date: Fri, 31 May 2013 20:06:56 +0000
+Subject: [PATCH] Properly escape MIME types containing +.
+
+Previously, MIME types were placed as-is into regular expressions.  This caused
+problems for types such as image/svg+xml and breaking mimeopen.  Now the MIME
+types are escaped so that they are matched properly.
+---
+ lib/File/MimeInfo/Applications.pm | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/File/MimeInfo/Applications.pm 
b/lib/File/MimeInfo/Applications.pm
+index 645861b..6eea4f0 100644
+--- a/lib/File/MimeInfo/Applications.pm
++++ b/lib/File/MimeInfo/Applications.pm
+@@ -120,7 +120,7 @@ sub _read_list { # read list with 
"mime/type=foo.desktop;bar.desktop" format
+       my @list;
+       open LIST, '<', $file or croak "Could not read file: $file";
+       while (<LIST>) {
+-              /^$mimetype=(.*)$/ or next;
++              /^\Q$mimetype\E=(.*)$/ or next;
+               push @list, grep defined($_), split ';', $1;
+       }
+       close LIST;
+@@ -135,7 +135,7 @@ sub _write_list {
+       if (-f $file) {
+               open LIST, '<', $file or croak "Could not read file: $file";
+               while (<LIST>) {
+-                      $text .= $_ unless /^$mimetype=/;
++                      $text .= $_ unless /^\Q$mimetype\E=/;
+               }
+               close LIST;
+               $text =~ s/[\n\r]?$/\n/; # just to be sure
+-- 
+1.8.0
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..ec63b9a
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Properly-escape-MIME-types-containing.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libfile-mimeinfo-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to