summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-06-22 23:05:23 -0400
committerEvan Prodromou <evan@prodromou.name>2008-06-22 23:05:23 -0400
commit8ac3474361a62b58993b4d3a2e23b53aff843532 (patch)
treed745736333bb08afe3e54a913fe4b3d4692110e0
parent47bc5562f6da6fc226aa577a1fdc556ccad3bf62 (diff)
dont let the daemon get called from a web server
darcs-hash:20080623030523-84dde-d667f0e35b5719cee8496df4b0782dbb4afe5177.gz
-rw-r--r--xmppdaemon.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmppdaemon.php b/xmppdaemon.php
index 2cf001754..e11e5f5ad 100644
--- a/xmppdaemon.php
+++ b/xmppdaemon.php
@@ -17,6 +17,12 @@
* 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);