]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #1794: Allow 00:00-24:00 time specifications even if redundant
authorhno <>
Mon, 9 Oct 2006 18:43:02 +0000 (18:43 +0000)
committerhno <>
Mon, 9 Oct 2006 18:43:02 +0000 (18:43 +0000)
00:00-23:59 covers all 24 hours of the day, but it's easier to use 24:00.

src/ACLTimeData.cc

index ef8ac5d39526224a7bbb98072a157bb9a9ebba51..1093bc3def14210f022b0601ba956913d08a6cfa 100644 (file)
@@ -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();