From: Michael R Sweet Date: Mon, 17 Mar 2025 16:28:57 +0000 (-0400) Subject: Extend datwTime validation to UTC+14 (Issue #1201) X-Git-Tag: v2.4.12~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc8367e58d8df02073fcc438bbe392697b269071;p=thirdparty%2Fcups.git Extend datwTime validation to UTC+14 (Issue #1201) --- diff --git a/CHANGES.md b/CHANGES.md index 7100f33ff1..1e245ac0b3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -14,6 +14,8 @@ Changes in CUPS v2.4.12 (YYYY-MM-DD) - Fixed client raster printing from macOS (Issue #1143) - Fixed the default User-Agent string. - Fixed a recursion issue in `ippReadIO`. +- Fixed validation of dateTime values with time zones more than UTC+11 + (Issue #1201) Changes in CUPS v2.4.11 (2024-09-30) diff --git a/cups/ipp.c b/cups/ipp.c index bc002620bd..8070785846 100644 --- a/cups/ipp.c +++ b/cups/ipp.c @@ -1,7 +1,7 @@ /* * Internet Printing Protocol functions for CUPS. * - * Copyright © 2022-2024 by OpenPrinting. + * Copyright © 2022-2025 by OpenPrinting. * Copyright © 2007-2021 by Apple Inc. * Copyright © 1997-2007 by Easy Software Products, all rights reserved. * @@ -4077,8 +4077,9 @@ ippValidateAttribute( return (0); } - if (date[9] > 11) + if (date[9] > 14) { + // Kiribata has a UTC+14 time zone, RFC 2579 calls for UTC+13 support, errata filed... ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad dateTime UTC hours %u (RFC 8011 section 5.1.15)."), attr->name, date[9]); return (0); }