diff options
author | bouyer <bouyer@pkgsrc.org> | 2018-06-22 14:12:45 +0000 |
---|---|---|
committer | bouyer <bouyer@pkgsrc.org> | 2018-06-22 14:12:45 +0000 |
commit | 732a7f7d50a7877dbac4af26073e8734295393c2 (patch) | |
tree | 8f001910e34fc7b12f360c348c4710e23eede79c /print/cups-base | |
parent | 1ed4547d599e264ccbaff2d7324c1e14d5e965e0 (diff) | |
download | pkgsrc-732a7f7d50a7877dbac4af26073e8734295393c2.tar.gz |
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 (limited to 'print/cups-base')
-rw-r--r-- | print/cups-base/Makefile | 3 | ||||
-rw-r--r-- | print/cups-base/distinfo | 3 | ||||
-rw-r--r-- | print/cups-base/patches/patch-cups_ipp.c | 65 |
3 files changed, 69 insertions, 2 deletions
diff --git a/print/cups-base/Makefile b/print/cups-base/Makefile index 2020821f78b..6c57bfa0d47 100644 --- a/print/cups-base/Makefile +++ b/print/cups-base/Makefile @@ -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 --git a/print/cups-base/distinfo b/print/cups-base/distinfo index 23698d03f8e..25b46ff57ba 100644 --- a/print/cups-base/distinfo +++ b/print/cups-base/distinfo @@ -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-libtool.m4) = a6139fbbbee7038d11654c0a2387af21f4 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 --git a/print/cups-base/patches/patch-cups_ipp.c b/print/cups-base/patches/patch-cups_ipp.c new file mode 100644 index 00000000000..634796c5ce7 --- /dev/null +++ b/print/cups-base/patches/patch-cups_ipp.c @@ -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)) + { |