Package: release.debian.org
Severity: normal
Tags: buster
User: release.debian....@packages.debian.org
Usertags: pu

The 'php-horde-text-filter' contains a few regular expressions that are
incompatible with the libpcre2 as shipped in Debian/buster.
These buggy regexps make the popular groupware and webmail solution "horde"
unable to render plain-text emails, which makes it pretty useless as a webmail
solution.

There have been two bug-reports describing the problem:
  https://bugs.debian.org/931255 (severity: Grave)
  https://bugs.debian.org/935816 (against php-horde-imp, that exposes the
problem but is not the cause)

The proposed update of the package fixes the regexps, so horde can again be used
on Debian/stretch.

horde and all it's packages (php-horde-*) have been orphaned a few months ago.
the original maintainer (Mathieu Parent) uploaded a fixed version (new upstream)
to unstable a year ago, but did not find the time to do an upload to buster
before abandoning the package.
the fix itself is pretty trivial, so backporting it was simple enough.

i'm currently running a patched version of php-horde-text-filter on my
production horde instance.

you can find a debdiff attached to this bugreport.
please consider this small fix for the next Debian/buster (sub)release.

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'stable-updates'), (500, 
'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.4.0-2-amd64 (SMP w/4 CPU cores)
Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C.UTF-8 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru php-horde-text-filter-2.3.5/debian/changelog 
php-horde-text-filter-2.3.5/debian/changelog
--- php-horde-text-filter-2.3.5/debian/changelog        2018-05-15 
09:22:54.000000000 +0200
+++ php-horde-text-filter-2.3.5/debian/changelog        2020-01-28 
10:41:46.000000000 +0100
@@ -1,3 +1,15 @@
+php-horde-text-filter (2.3.5-3+deb10u1) buster; urgency=medium
+
+  * QA upload.
+  * Mark package as orphaned (See #942282)
+
+  [ IOhannes m zmölnig ]
+  * Fixed regular-expressions (used e.g. for displaying plain-text mails)
+    (Closes: #931255, #935816)
+  * Switched upstream branch in the packaging git on salsa to 'debian-buster'
+
+ -- IOhannes m zmölnig (Debian/GNU) <umlae...@debian.org>  Tue, 28 Jan 2020 
10:41:46 +0100
+
 php-horde-text-filter (2.3.5-3) unstable; urgency=medium
 
   * Update Standards-Version to 4.1.4, no change
diff -Nru php-horde-text-filter-2.3.5/debian/control 
php-horde-text-filter-2.3.5/debian/control
--- php-horde-text-filter-2.3.5/debian/control  2018-05-15 09:22:54.000000000 
+0200
+++ php-horde-text-filter-2.3.5/debian/control  2020-01-28 10:41:46.000000000 
+0100
@@ -2,7 +2,7 @@
 Section: php
 Priority: optional
 Maintainer: Horde Maintainers <team+debian-horde-t...@tracker.debian.org>
-Uploaders: Mathieu Parent <sath...@debian.org>
+Uploaders: Debian QA Group <packa...@qa.debian.org>
 Build-Depends: debhelper (>= 11), pkg-php-tools (>= 1.1), pear-horde-channel
 Standards-Version: 4.1.4
 Homepage: http://www.horde.org/
diff -Nru php-horde-text-filter-2.3.5/debian/gbp.conf 
php-horde-text-filter-2.3.5/debian/gbp.conf
--- php-horde-text-filter-2.3.5/debian/gbp.conf 2018-05-15 09:22:54.000000000 
+0200
+++ php-horde-text-filter-2.3.5/debian/gbp.conf 2020-01-28 10:41:46.000000000 
+0100
@@ -1,7 +1,7 @@
 [DEFAULT]
 pristine-tar = True
 upstream-branch = upstream-sid
-debian-branch = debian-sid
+debian-branch = debian-buster
 
 [buildpackage]
 export-dir = ../build-area/
diff -Nru 
php-horde-text-filter-2.3.5/debian/patches/0001_protect_the_-_this_is_not_a_range.patch
 
php-horde-text-filter-2.3.5/debian/patches/0001_protect_the_-_this_is_not_a_range.patch
--- 
php-horde-text-filter-2.3.5/debian/patches/0001_protect_the_-_this_is_not_a_range.patch
     1970-01-01 01:00:00.000000000 +0100
+++ 
php-horde-text-filter-2.3.5/debian/patches/0001_protect_the_-_this_is_not_a_range.patch
     2020-01-28 10:41:46.000000000 +0100
@@ -0,0 +1,30 @@
+Description: protect the -, this is not a range
+ Makes regular expressions valid...
+Author: Remi Collet <r...@remirepo.net>
+Origin: upstream
+Applied-Upstream: 
https://github.com/horde/Text_Filter/commit/8d0de407dbb95626bc54eaba078191847be9c574
+Last-Update: 2020-01-28
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- 
php-horde-text-filter.orig/Horde_Text_Filter-2.3.5/lib/Horde/Text/Filter/Emails.php
++++ 
php-horde-text-filter/Horde_Text_Filter-2.3.5/lib/Horde/Text/Filter/Emails.php
+@@ -61,7 +61,7 @@
+             ((?(1)\s*\]))
+         |
+             # Version 2 Pattern 9 and 10: simple email addresses.
+-            (^|\s|&lt;|<|\[)([\w-+.=]+@[-A-Z0-9.]*[A-Z0-9])
++            (^|\s|&lt;|<|\[)([\w\-+.=]+@[-A-Z0-9.]*[A-Z0-9])
+             # Pattern 11 to 13: Optional parameters
+             ((\?)([^\s"<]*[\w+#?\/&=]))?
+             # Pattern 14: Optional closing bracket
+--- 
php-horde-text-filter.orig/Horde_Text_Filter-2.3.5/lib/Horde/Text/Filter/Linkurls.php
++++ 
php-horde-text-filter/Horde_Text_Filter-2.3.5/lib/Horde/Text/Filter/Linkurls.php
+@@ -86,7 +86,7 @@
+ (?:\b|^)
+ (  # Capture 1: entire matched URL
+   (
+-   (?:[a-z][\w-+]{0,19})?:/{1,3}  # URL protocol and colon followed by 1-3
++   (?:[a-z][\w\-+]{0,19})?:/{1,3}  # URL protocol and colon followed by 1-3
+                                   # slashes, or just colon and slashes (://)
+     |                             #  - or -
+     (?<!\.)www\d{0,3}\.           # "www.", "www1.", "www2." … "www999."
diff -Nru php-horde-text-filter-2.3.5/debian/patches/series 
php-horde-text-filter-2.3.5/debian/patches/series
--- php-horde-text-filter-2.3.5/debian/patches/series   1970-01-01 
01:00:00.000000000 +0100
+++ php-horde-text-filter-2.3.5/debian/patches/series   2020-01-28 
10:41:46.000000000 +0100
@@ -0,0 +1 @@
+0001_protect_the_-_this_is_not_a_range.patch

Reply via email to