]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
dont let the daemon get called from a web server
authorEvan Prodromou <evan@prodromou.name>
Mon, 23 Jun 2008 03:05:23 +0000 (23:05 -0400)
committerEvan Prodromou <evan@prodromou.name>
Mon, 23 Jun 2008 03:05:23 +0000 (23:05 -0400)
darcs-hash:20080623030523-84dde-d667f0e35b5719cee8496df4b0782dbb4afe5177.gz

xmppdaemon.php

index 2cf0017544a1a1793c76fa747a1b10a38ffa54d2..e11e5f5ad6fb628deb7231cc3fc5724d4cd9c346 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
+# Abort if called from a web server
+if (isset($_SERVER) && array_key_exists('REQUEST_METHOD', $_SERVER)) {
+       print "This script must be run from the command line\n";
+       exit();
+}
+
 define('INSTALLDIR', dirname(__FILE__));
 define('LACONICA', true);