The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Lock Script to Scheduled Task?
I have created a custom script and added it as a scheduled task but how can I lock it so only the scheduled task can run it?
I tried to lock it to IP, but it uses the user's ip. I tried passing a variable in the url in the task when it runs but it didn't work. I have dumped POST and GET but nothing gets passed through when the scheduler runs it. |
#2
|
|||
|
|||
I'm not sure I understand. Do you mean make it so that someone can't just enter the url in their browser and run it? The scheduled tasks that come with vbulletin have this at the beginning:
PHP Code:
so that if it's not included from a script that has already set up $vbulletin, it won't run. |
#3
|
||||
|
||||
Quote:
What I did for one of my external PHP files (called via clicking a link) is this: PHP Code:
|
#4
|
||||
|
||||
The latter is unsafe. There are several cases when $_SERVER['HTTP_REFERER'] will be empty, and it is easily faked.
|
#5
|
||||
|
||||
Just protect the directory with the cron script in it. If it's in the default cron folder than it should not be accessible anyways as you should block all access to the includes directory.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|