pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/print/cups-base Apply patch from upstream fixing a reg...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b5b8ff4b0fb9
branches:  trunk
changeset: 309713:b5b8ff4b0fb9
user:      bouyer <bouyer%pkgsrc.org@localhost>
date:      Fri Jun 22 14:12:45 2018 +0000

description:
Apply patch from upstream fixing a regression in ippValidateAttribute().
The bug is that some attributes are ignored/rejected, causing e.g. usernames
to be changed to anonymous in print queues and page log.
Bump PKGREVISION

diffstat:

 print/cups-base/Makefile                 |   3 +-
 print/cups-base/distinfo                 |   3 +-
 print/cups-base/patches/patch-cups_ipp.c |  65 ++++++++++++++++++++++++++++++++
 3 files changed, 69 insertions(+), 2 deletions(-)

diffs (98 lines):

diff -r 7da96b886415 -r b5b8ff4b0fb9 print/cups-base/Makefile
--- a/print/cups-base/Makefile  Fri Jun 22 13:02:05 2018 +0000
+++ b/print/cups-base/Makefile  Fri Jun 22 14:12:45 2018 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.10 2018/06/11 10:04:24 adam Exp $
+# $NetBSD: Makefile,v 1.11 2018/06/22 14:12:45 bouyer Exp $
 
 .include "../../print/cups/Makefile.common"
+PKGREVISION=1
 
 DISTNAME=      cups-${CUPS_VERS}-source
 PKGNAME=       cups-base-${CUPS_VERS}
diff -r 7da96b886415 -r b5b8ff4b0fb9 print/cups-base/distinfo
--- a/print/cups-base/distinfo  Fri Jun 22 13:02:05 2018 +0000
+++ b/print/cups-base/distinfo  Fri Jun 22 14:12:45 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.6 2018/06/11 10:04:24 adam Exp $
+$NetBSD: distinfo,v 1.7 2018/06/22 14:12:45 bouyer Exp $
 
 SHA1 (cups-2.2.8-source.tar.gz) = f8c572d5b2405091e3be6836523a6abdda645f60
 RMD160 (cups-2.2.8-source.tar.gz) = 79bc052e3f70408a698bfbe2556b53d2f0140b2c
@@ -17,6 +17,7 @@
 SHA1 (patch-config-scripts_cups-manpages.m4) = 5cc943738df29f11fc366557938b82c1e9162344
 SHA1 (patch-config-scripts_cups-opsys.m4) = 2bbacc401d4d8dbc157889b6a6cf66684c52357b
 SHA1 (patch-cups-tls.c) = f89c25f8089d9e11a983a270adbb2cbde3c22511
+SHA1 (patch-cups_ipp.c) = 3528644cf52b716ae2342342949ee94a1c0cf61d
 SHA1 (patch-doc-help-man-cups-files.conf.html) = fcd3d06c00b0a85b6c0790235ccb68685252ea68
 SHA1 (patch-man-cups-files.conf.man.in) = 820da58aa3f854018a48b68256d0cf0dc75b986e
 SHA1 (patch-ppdc_Makefile) = cdeb0ef9a68f9dd85453ef3076a0120ad9983698
diff -r 7da96b886415 -r b5b8ff4b0fb9 print/cups-base/patches/patch-cups_ipp.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/cups-base/patches/patch-cups_ipp.c  Fri Jun 22 14:12:45 2018 +0000
@@ -0,0 +1,65 @@
+$NetBSD: patch-cups_ipp.c,v 1.1 2018/06/22 14:12:45 bouyer Exp $
+From upstream: https://github.com/apple/cups/commit/18545a5e7ab478b187a0d7136ee19496ae32fc9b
+ Fix regressions in ippValidateAttribute (Issue #5322, Issue #5330) 
+
+--- cups/ipp.c.orig
++++ cups/ipp.c
+@@ -5101,16 +5101,19 @@ ippValidateAttribute(
+             break;
+         }
+ 
+-        if (*ptr < ' ' || *ptr == 0x7f)
+-        {
+-          ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad control character (PWG 5100.14 section 8.3)."), attr->name, attr->values[i].string.text);
+-          return (0);
+-        }
+-        else if (*ptr)
+-        {
+-          ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.2)."), attr->name, attr->values[i].string.text);
+-          return (0);
+-        }
++          if (*ptr)
++          {
++          if (*ptr < ' ' || *ptr == 0x7f)
++          {
++            ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad control character (PWG 5100.14 section 8.3)."), attr->name, attr->values[i].string.text);
++            return (0);
++          }
++          else
++          {
++            ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.2)."), attr->name, attr->values[i].string.text);
++            return (0);
++          }
++          }
+ 
+         if ((ptr - attr->values[i].string.text) > (IPP_MAX_TEXT - 1))
+         {
+@@ -5163,16 +5166,19 @@ ippValidateAttribute(
+             break;
+         }
+ 
+-        if (*ptr < ' ' || *ptr == 0x7f)
+-        {
+-          ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad control character (PWG 5100.14 section 8.1)."), attr->name, attr->values[i].string.text);
+-          return (0);
+-        }
+-        else if (*ptr)
++        if (*ptr)
+         {
+-          ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.3)."), attr->name, attr->values[i].string.text);
+-          return (0);
+-        }
++          if (*ptr < ' ' || *ptr == 0x7f)
++          {
++            ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad control character (PWG 5100.14 section 8.1)."), attr->name, attr->values[i].string.text);
++            return (0);
++          }
++          else
++          {
++            ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.3)."), attr->name, attr->values[i].string.text);
++            return (0);
++          }
++          }
+ 
+         if ((ptr - attr->values[i].string.text) > (IPP_MAX_NAME - 1))
+         {



Home | Main Index | Thread Index | Old Index