Przeglądaj źródła

Merge pull request #1453 from Skamasle/patch-19

Fix Min and hour limit in cron validation
Anton Reutov 8 lat temu
rodzic
commit
bc82fcaf71
1 zmienionych plików z 5 dodań i 1 usunięć
  1. 5 1
      func/main.sh

+ 5 - 1
func/main.sh

@@ -723,8 +723,12 @@ is_ip_status_format_valid() {
 
 # Cron validator
 is_cron_format_valid() {
-    limit=60
+    limit=59
     check_format=''
+    if [ "$2" = 'hour' ]; then
+        limit=23
+    fi
+    
     if [ "$2" = 'day' ]; then
         limit=31
     fi