From: hno <> Date: Mon, 9 Oct 2006 18:43:02 +0000 (+0000) Subject: Bug #1794: Allow 00:00-24:00 time specifications even if redundant X-Git-Tag: SQUID_3_0_PRE5~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6494b68a63c1f7b01ae23e046dd54289395598d7;p=thirdparty%2Fsquid.git Bug #1794: Allow 00:00-24:00 time specifications even if redundant 00:00-23:59 covers all 24 hours of the day, but it's easier to use 24:00. --- diff --git a/src/ACLTimeData.cc b/src/ACLTimeData.cc index ef8ac5d395..1093bc3def 100644 --- a/src/ACLTimeData.cc +++ b/src/ACLTimeData.cc @@ -1,5 +1,5 @@ /* - * $Id: ACLTimeData.cc,v 1.12 2006/08/26 12:24:12 serassio Exp $ + * $Id: ACLTimeData.cc,v 1.13 2006/10/09 12:43:02 hno Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -190,7 +190,7 @@ ACLTimeData::parse() } else { /* assume its time-of-day spec */ - if ((sscanf(t, "%d:%d-%d:%d", &h1, &m1, &h2, &m2) < 4) || (!((h1 >= 0 && h1 < 24) && (h2 >= 0 && h2 < 24) && (m1 >= 0 && m1 < 60) && (m2 >= 0 && m2 < 60)))) { + if ((sscanf(t, "%d:%d-%d:%d", &h1, &m1, &h2, &m2) < 4) || (!((h1 >= 0 && h1 < 24) && ((h2 >= 0 && h2 < 24) || (h2 == 24 && m2 == 0)) && (m1 >= 0 && m1 < 60) && (m2 >= 0 && m2 < 60)))) { debug(28, 0) ("aclParseTimeSpec: Bad time range '%s'\n", t); self_destruct();