Browse Source

Fix schedule.php SCHEDULE_KEY logic use as a parameter.

Current logic does not check $argv and only checks $_REQUEST['key'] .
Added in $argv logic whilst retaining the ?key= functionality.
The original WCD instructions state that it should be used as a
parameter but I cannot see how this would ever work. This code
allows SCHEDULE_KEY to be used as a parameter via cron.
Benjamin Goodacre 7 years ago
parent
commit
d3a27b1e85
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      sections/schedule/index.php

+ 1
- 1
sections/schedule/index.php View File

27
   }
27
   }
28
 }
28
 }
29
 
29
 
30
-if ((!isset($_REQUEST['key']) || $_REQUEST['key'] != SCHEDULE_KEY) && !$AS) {
30
+if ($_REQUEST['key'] != SCHEDULE_KEY && $argv[1]!=SCHEDULE_KEY && !$AS) {
31
   error(403);
31
   error(403);
32
 }
32
 }
33
 
33
 

Loading…
Cancel
Save