From f62e7c461f2fb4fcdc91b125072be953fc09fbe2 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 8 Oct 2010 10:33:43 -0700 Subject: [PATCH 1/7] Fix PHP fatal error in DeletenoticeAction: died when we had a valid notice, but weren't logged in due to accessing $this->user before the login check. Moved check up to prepare() from handle() so it's done before usage --- actions/deletenotice.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/actions/deletenotice.php b/actions/deletenotice.php index 68c43040b0..2879faa5df 100644 --- a/actions/deletenotice.php +++ b/actions/deletenotice.php @@ -45,6 +45,12 @@ class DeletenoticeAction extends Action parent::prepare($args); $this->user = common_current_user(); + + if (!$this->user) { + common_user_error(_('Not logged in.')); + exit; + } + $notice_id = $this->trimmed('notice'); $this->notice = Notice::staticGet($notice_id); @@ -63,10 +69,7 @@ class DeletenoticeAction extends Action { parent::handle($args); - if (!common_logged_in()) { - common_user_error(_('Not logged in.')); - exit; - } else if ($this->notice->profile_id != $this->user_profile->id && + if ($this->notice->profile_id != $this->user_profile->id && !$this->user->hasRight(Right::DELETEOTHERSNOTICE)) { common_user_error(_('Can\'t delete this notice.')); exit; From 69b13cb279d7b60cb3a7beb9ad39cfe3a3b7745b Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 8 Oct 2010 10:42:59 -0700 Subject: [PATCH 2/7] Normalize execution guards on OStatus php files; mostly helps cut down on annoying 'class not found' errors when something spiders the dirs. :P --- plugins/OStatus/OStatusPlugin.php | 4 +++- plugins/OStatus/actions/hostmeta.php | 4 +++- plugins/OStatus/actions/ostatusgroup.php | 4 +++- plugins/OStatus/actions/ostatusinit.php | 5 +++-- plugins/OStatus/actions/ostatussub.php | 4 +++- plugins/OStatus/actions/ownerxrd.php | 4 +++- plugins/OStatus/actions/pushcallback.php | 4 +++- plugins/OStatus/actions/pushhub.php | 4 ++++ plugins/OStatus/actions/userxrd.php | 4 +++- plugins/OStatus/classes/FeedSub.php | 4 ++++ plugins/OStatus/classes/HubSub.php | 4 ++++ plugins/OStatus/classes/Magicsig.php | 4 ++++ plugins/OStatus/classes/Ostatus_profile.php | 4 ++++ plugins/OStatus/classes/Ostatus_source.php | 4 ++++ plugins/OStatus/lib/feeddiscovery.php | 4 +++- plugins/OStatus/lib/hubconfqueuehandler.php | 4 ++++ plugins/OStatus/lib/huboutqueuehandler.php | 4 ++++ plugins/OStatus/lib/hubprepqueuehandler.php | 4 ++++ plugins/OStatus/lib/ostatusqueuehandler.php | 4 ++++ plugins/OStatus/lib/pushinqueuehandler.php | 4 ++++ plugins/OStatus/lib/salmonqueuehandler.php | 4 ++++ plugins/OStatus/lib/xrdaction.php | 4 +++- 22 files changed, 78 insertions(+), 11 deletions(-) diff --git a/plugins/OStatus/OStatusPlugin.php b/plugins/OStatus/OStatusPlugin.php index 9c6696439a..4ab2023cbe 100644 --- a/plugins/OStatus/OStatusPlugin.php +++ b/plugins/OStatus/OStatusPlugin.php @@ -22,7 +22,9 @@ * @maintainer Brion Vibber */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__) . '/extlib/'); diff --git a/plugins/OStatus/actions/hostmeta.php b/plugins/OStatus/actions/hostmeta.php index db4c913e16..14f69ac192 100644 --- a/plugins/OStatus/actions/hostmeta.php +++ b/plugins/OStatus/actions/hostmeta.php @@ -22,7 +22,9 @@ * @maintainer James Walker */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} class HostMetaAction extends Action { diff --git a/plugins/OStatus/actions/ostatusgroup.php b/plugins/OStatus/actions/ostatusgroup.php index 7db00ffbef..24fbaac9ca 100644 --- a/plugins/OStatus/actions/ostatusgroup.php +++ b/plugins/OStatus/actions/ostatusgroup.php @@ -22,7 +22,9 @@ * @maintainer Brion Vibber */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} /** * Key UI methods: diff --git a/plugins/OStatus/actions/ostatusinit.php b/plugins/OStatus/actions/ostatusinit.php index f576823e31..91c36203c8 100644 --- a/plugins/OStatus/actions/ostatusinit.php +++ b/plugins/OStatus/actions/ostatusinit.php @@ -22,8 +22,9 @@ * @maintainer James Walker */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } - +if (!defined('STATUSNET')) { + exit(1); +} class OStatusInitAction extends Action { diff --git a/plugins/OStatus/actions/ostatussub.php b/plugins/OStatus/actions/ostatussub.php index 493b519657..a293fda5db 100644 --- a/plugins/OStatus/actions/ostatussub.php +++ b/plugins/OStatus/actions/ostatussub.php @@ -22,7 +22,9 @@ * @maintainer Brion Vibber */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} /** * Key UI methods: diff --git a/plugins/OStatus/actions/ownerxrd.php b/plugins/OStatus/actions/ownerxrd.php index 9e84f72ecb..3f99e1cbd0 100644 --- a/plugins/OStatus/actions/ownerxrd.php +++ b/plugins/OStatus/actions/ownerxrd.php @@ -22,7 +22,9 @@ * @maintainer James Walker */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} class OwnerxrdAction extends XrdAction { diff --git a/plugins/OStatus/actions/pushcallback.php b/plugins/OStatus/actions/pushcallback.php index 6eec1ad16e..9b83d43c4d 100644 --- a/plugins/OStatus/actions/pushcallback.php +++ b/plugins/OStatus/actions/pushcallback.php @@ -22,7 +22,9 @@ * @maintainer Brion Vibber */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} class PushCallbackAction extends Action { diff --git a/plugins/OStatus/actions/pushhub.php b/plugins/OStatus/actions/pushhub.php index 68035ab5cc..bfd51ec02f 100644 --- a/plugins/OStatus/actions/pushhub.php +++ b/plugins/OStatus/actions/pushhub.php @@ -23,6 +23,10 @@ * @maintainer Brion Vibber */ +if (!defined('STATUSNET')) { + exit(1); +} + /** diff --git a/plugins/OStatus/actions/userxrd.php b/plugins/OStatus/actions/userxrd.php index 8179505a55..c9b1d0a5be 100644 --- a/plugins/OStatus/actions/userxrd.php +++ b/plugins/OStatus/actions/userxrd.php @@ -17,7 +17,9 @@ * along with this program. If not, see . */ -if (!defined('STATUSNET')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} /** * @package OStatusPlugin diff --git a/plugins/OStatus/classes/FeedSub.php b/plugins/OStatus/classes/FeedSub.php index 58beec6738..140f323846 100644 --- a/plugins/OStatus/classes/FeedSub.php +++ b/plugins/OStatus/classes/FeedSub.php @@ -17,6 +17,10 @@ * along with this program. If not, see . */ +if (!defined('STATUSNET')) { + exit(1); +} + /** * @package OStatusPlugin * @maintainer Brion Vibber diff --git a/plugins/OStatus/classes/HubSub.php b/plugins/OStatus/classes/HubSub.php index 825d36ebd6..e7ac23af58 100644 --- a/plugins/OStatus/classes/HubSub.php +++ b/plugins/OStatus/classes/HubSub.php @@ -17,6 +17,10 @@ * along with this program. If not, see . */ +if (!defined('STATUSNET')) { + exit(1); +} + /** * PuSH feed subscription record * @package Hub diff --git a/plugins/OStatus/classes/Magicsig.php b/plugins/OStatus/classes/Magicsig.php index 20025c37a6..e057deb144 100644 --- a/plugins/OStatus/classes/Magicsig.php +++ b/plugins/OStatus/classes/Magicsig.php @@ -27,6 +27,10 @@ * @link http://status.net/ */ +if (!defined('STATUSNET')) { + exit(1); +} + require_once 'Crypt/RSA.php'; class Magicsig extends Memcached_DataObject diff --git a/plugins/OStatus/classes/Ostatus_profile.php b/plugins/OStatus/classes/Ostatus_profile.php index 10cee917e1..47aee15f8a 100644 --- a/plugins/OStatus/classes/Ostatus_profile.php +++ b/plugins/OStatus/classes/Ostatus_profile.php @@ -17,6 +17,10 @@ * along with this program. If not, see . */ +if (!defined('STATUSNET')) { + exit(1); +} + /** * @package OStatusPlugin * @maintainer Brion Vibber diff --git a/plugins/OStatus/classes/Ostatus_source.php b/plugins/OStatus/classes/Ostatus_source.php index b76bbce56c..0fd74e48ba 100644 --- a/plugins/OStatus/classes/Ostatus_source.php +++ b/plugins/OStatus/classes/Ostatus_source.php @@ -17,6 +17,10 @@ * along with this program. If not, see . */ +if (!defined('STATUSNET')) { + exit(1); +} + /** * @package OStatusPlugin * @maintainer Brion Vibber diff --git a/plugins/OStatus/lib/feeddiscovery.php b/plugins/OStatus/lib/feeddiscovery.php index 8a166a0be5..d978cc6745 100644 --- a/plugins/OStatus/lib/feeddiscovery.php +++ b/plugins/OStatus/lib/feeddiscovery.php @@ -22,7 +22,9 @@ * @maintainer Brion Vibber */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} class FeedSubBadURLException extends FeedSubException { diff --git a/plugins/OStatus/lib/hubconfqueuehandler.php b/plugins/OStatus/lib/hubconfqueuehandler.php index 8219f8420e..d26c45be04 100644 --- a/plugins/OStatus/lib/hubconfqueuehandler.php +++ b/plugins/OStatus/lib/hubconfqueuehandler.php @@ -17,6 +17,10 @@ * along with this program. If not, see . */ +if (!defined('STATUSNET')) { + exit(1); +} + /** * Send a PuSH subscription verification from our internal hub. * @package Hub diff --git a/plugins/OStatus/lib/huboutqueuehandler.php b/plugins/OStatus/lib/huboutqueuehandler.php index 3ad94646e6..67a9d9e36b 100644 --- a/plugins/OStatus/lib/huboutqueuehandler.php +++ b/plugins/OStatus/lib/huboutqueuehandler.php @@ -17,6 +17,10 @@ * along with this program. If not, see . */ +if (!defined('STATUSNET')) { + exit(1); +} + /** * Send a raw PuSH atom update from our internal hub. * @package Hub diff --git a/plugins/OStatus/lib/hubprepqueuehandler.php b/plugins/OStatus/lib/hubprepqueuehandler.php index 0d585938f4..0ed6a3ec57 100644 --- a/plugins/OStatus/lib/hubprepqueuehandler.php +++ b/plugins/OStatus/lib/hubprepqueuehandler.php @@ -17,6 +17,10 @@ * along with this program. If not, see . */ +if (!defined('STATUSNET')) { + exit(1); +} + /** * When we have a large batch of PuSH consumers, we break the data set * into smaller chunks. Enqueue final destinations... diff --git a/plugins/OStatus/lib/ostatusqueuehandler.php b/plugins/OStatus/lib/ostatusqueuehandler.php index 5e0ab46a5b..d5ee0c5041 100644 --- a/plugins/OStatus/lib/ostatusqueuehandler.php +++ b/plugins/OStatus/lib/ostatusqueuehandler.php @@ -17,6 +17,10 @@ * along with this program. If not, see . */ +if (!defined('STATUSNET')) { + exit(1); +} + /** * Prepare PuSH and Salmon distributions for an outgoing message. * diff --git a/plugins/OStatus/lib/pushinqueuehandler.php b/plugins/OStatus/lib/pushinqueuehandler.php index 965d042668..ec1911653a 100644 --- a/plugins/OStatus/lib/pushinqueuehandler.php +++ b/plugins/OStatus/lib/pushinqueuehandler.php @@ -17,6 +17,10 @@ * along with this program. If not, see . */ +if (!defined('STATUSNET')) { + exit(1); +} + /** * Process a feed distribution POST from a PuSH hub. * @package FeedSub diff --git a/plugins/OStatus/lib/salmonqueuehandler.php b/plugins/OStatus/lib/salmonqueuehandler.php index 56d3c9eff2..e70d5ff521 100644 --- a/plugins/OStatus/lib/salmonqueuehandler.php +++ b/plugins/OStatus/lib/salmonqueuehandler.php @@ -17,6 +17,10 @@ * along with this program. If not, see . */ +if (!defined('STATUSNET')) { + exit(1); +} + /** * Send a Salmon notification in the background. * @package OStatusPlugin diff --git a/plugins/OStatus/lib/xrdaction.php b/plugins/OStatus/lib/xrdaction.php index c8b5beff37..d1488dbdec 100644 --- a/plugins/OStatus/lib/xrdaction.php +++ b/plugins/OStatus/lib/xrdaction.php @@ -22,7 +22,9 @@ * @maintainer James Walker */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} class XrdAction extends Action { From e23ad7392fa0a84a3cea2f50b0f96e4ba68a372b Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 8 Oct 2010 11:01:13 -0700 Subject: [PATCH 3/7] Normalize execution guards in imap plugin files. --- plugins/Imap/imapmailhandler.php | 4 +++- plugins/Imap/imapmanager.php | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/Imap/imapmailhandler.php b/plugins/Imap/imapmailhandler.php index 3d4b6113a9..92abf64747 100644 --- a/plugins/Imap/imapmailhandler.php +++ b/plugins/Imap/imapmailhandler.php @@ -17,7 +17,9 @@ * along with this program. If not, see . */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} class IMAPMailHandler extends MailHandler { diff --git a/plugins/Imap/imapmanager.php b/plugins/Imap/imapmanager.php index e2f8c6d543..a9e531e1ae 100644 --- a/plugins/Imap/imapmanager.php +++ b/plugins/Imap/imapmanager.php @@ -29,6 +29,10 @@ * @link http://status.net/ */ +if (!defined('STATUSNET')) { + exit(1); +} + class ImapManager extends IoManager { protected $conn = null; From 7adc6027ff3c344f549bddd2c60372a2c5ea9c40 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 8 Oct 2010 11:06:30 -0700 Subject: [PATCH 4/7] Fix fatal error in FacebookremoveAction if we end up getting called double and the foreign_link entry has already been removed. --- plugins/Facebook/facebookremove.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/Facebook/facebookremove.php b/plugins/Facebook/facebookremove.php index b048a435f5..bc76daaef6 100644 --- a/plugins/Facebook/facebookremove.php +++ b/plugins/Facebook/facebookremove.php @@ -48,6 +48,12 @@ class FacebookremoveAction extends FacebookAction $flink = Foreign_link::getByForeignID($this->arg('fb_sig_user'), 2); + if (!$flink) { + common_log(LOG_ERR, "Tried to delete missing foreign_link entry with Facebook ID " . $this->arg('fb_sig_user')); + $this->serverError(_m('Couldn\'t remove Facebook user: already deleted.')); + return; + } + common_debug("Removing foreign link to Facebook - local user ID: $flink->user_id, Facebook ID: $flink->foreign_id"); $result = $flink->delete(); From 5fe59322bc9e2be876952c29a52ff43513f46463 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 8 Oct 2010 11:12:36 -0700 Subject: [PATCH 5/7] Check for Twitter foreign link actually existing before trying to delete it; friendlier error message in TwittersettingsAction --- plugins/TwitterBridge/twittersettings.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/TwitterBridge/twittersettings.php b/plugins/TwitterBridge/twittersettings.php index dab8ab34fe..33c5eb65bb 100644 --- a/plugins/TwitterBridge/twittersettings.php +++ b/plugins/TwitterBridge/twittersettings.php @@ -247,6 +247,11 @@ class TwittersettingsAction extends ConnectSettingsAction $user = common_current_user(); $flink = Foreign_link::getByUserID($user->id, TWITTER_SERVICE); + if (empty($flink)) { + $this->clientError(_m('No Twitter connection to remove.')); + return; + } + $result = $flink->safeDelete(); if (empty($result)) { From a30ea4568ff4b2a324a8a6a8870d1d72fa9ddab3 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 8 Oct 2010 11:23:53 -0700 Subject: [PATCH 6/7] Normalize execution guards in OpenID plugin files; avoids annoying fatal errors when .php files get spidered. --- plugins/OpenID/User_openid.php | 5 ++++- plugins/OpenID/User_openid_trustroot.php | 5 ++++- plugins/OpenID/finishaddopenid.php | 2 +- plugins/OpenID/finishopenidlogin.php | 4 +++- plugins/OpenID/openid.php | 6 +++--- plugins/OpenID/openidlogin.php | 4 +++- plugins/OpenID/openidserver.php | 4 +--- plugins/OpenID/openidsettings.php | 3 +-- plugins/OpenID/openidtrust.php | 5 +++-- 9 files changed, 23 insertions(+), 15 deletions(-) diff --git a/plugins/OpenID/User_openid.php b/plugins/OpenID/User_openid.php index 1beff9ea30..e34cf21f2c 100644 --- a/plugins/OpenID/User_openid.php +++ b/plugins/OpenID/User_openid.php @@ -2,7 +2,10 @@ /** * Table Definition for user_openid */ -require_once INSTALLDIR.'/classes/Memcached_DataObject.php'; + +if (!defined('STATUSNET')) { + exit(1); +} class User_openid extends Memcached_DataObject { diff --git a/plugins/OpenID/User_openid_trustroot.php b/plugins/OpenID/User_openid_trustroot.php index 17c03afb02..69e0a3f3e0 100644 --- a/plugins/OpenID/User_openid_trustroot.php +++ b/plugins/OpenID/User_openid_trustroot.php @@ -2,7 +2,10 @@ /** * Table Definition for user_openid_trustroot */ -require_once INSTALLDIR.'/classes/Memcached_DataObject.php'; + +if (!defined('STATUSNET')) { + exit(1); +} class User_openid_trustroot extends Memcached_DataObject { diff --git a/plugins/OpenID/finishaddopenid.php b/plugins/OpenID/finishaddopenid.php index 47b3f7fb16..6eb2f2d206 100644 --- a/plugins/OpenID/finishaddopenid.php +++ b/plugins/OpenID/finishaddopenid.php @@ -27,7 +27,7 @@ * @link http://status.net/ */ -if (!defined('STATUSNET') && !defined('LACONICA')) { +if (!defined('STATUSNET')) { exit(1); } diff --git a/plugins/OpenID/finishopenidlogin.php b/plugins/OpenID/finishopenidlogin.php index 0c03b5c4db..01dd61edb1 100644 --- a/plugins/OpenID/finishopenidlogin.php +++ b/plugins/OpenID/finishopenidlogin.php @@ -17,7 +17,9 @@ * along with this program. If not, see . */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} require_once INSTALLDIR.'/plugins/OpenID/openid.php'; diff --git a/plugins/OpenID/openid.php b/plugins/OpenID/openid.php index 1b93163e5f..ad251aa2cd 100644 --- a/plugins/OpenID/openid.php +++ b/plugins/OpenID/openid.php @@ -17,9 +17,9 @@ * along with this program. If not, see . */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } - -require_once(INSTALLDIR.'/plugins/OpenID/User_openid.php'); +if (!defined('STATUSNET')) { + exit(1); +} require_once('Auth/OpenID.php'); require_once('Auth/OpenID/Consumer.php'); diff --git a/plugins/OpenID/openidlogin.php b/plugins/OpenID/openidlogin.php index 20d6e070cd..4046068cfa 100644 --- a/plugins/OpenID/openidlogin.php +++ b/plugins/OpenID/openidlogin.php @@ -17,7 +17,9 @@ * along with this program. If not, see . */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} require_once INSTALLDIR.'/plugins/OpenID/openid.php'; diff --git a/plugins/OpenID/openidserver.php b/plugins/OpenID/openidserver.php index b2cf1f8ac3..ed9db4fd28 100644 --- a/plugins/OpenID/openidserver.php +++ b/plugins/OpenID/openidserver.php @@ -28,13 +28,11 @@ * @link http://status.net/ */ -if (!defined('STATUSNET') && !defined('LACONICA')) { +if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR.'/lib/action.php'; require_once INSTALLDIR.'/plugins/OpenID/openid.php'; -require_once(INSTALLDIR.'/plugins/OpenID/User_openid_trustroot.php'); /** * Settings for OpenID diff --git a/plugins/OpenID/openidsettings.php b/plugins/OpenID/openidsettings.php index 505e7d0ee3..b7d5bd084d 100644 --- a/plugins/OpenID/openidsettings.php +++ b/plugins/OpenID/openidsettings.php @@ -27,11 +27,10 @@ * @link http://status.net/ */ -if (!defined('STATUSNET') && !defined('LACONICA')) { +if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR.'/lib/accountsettingsaction.php'; require_once INSTALLDIR.'/plugins/OpenID/openid.php'; /** diff --git a/plugins/OpenID/openidtrust.php b/plugins/OpenID/openidtrust.php index ed6ca73a47..89f3150f63 100644 --- a/plugins/OpenID/openidtrust.php +++ b/plugins/OpenID/openidtrust.php @@ -17,10 +17,11 @@ * along with this program. If not, see . */ -if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +if (!defined('STATUSNET')) { + exit(1); +} require_once INSTALLDIR.'/plugins/OpenID/openid.php'; -require_once(INSTALLDIR.'/plugins/OpenID/User_openid_trustroot.php'); class OpenidtrustAction extends Action { From 34e9549756102dccd9069fc6156f1c28839801e8 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 8 Oct 2010 11:26:57 -0700 Subject: [PATCH 7/7] execution guard fixes in Facebook plugin files --- plugins/Facebook/FBConnectAuth.php | 4 ++++ plugins/Facebook/facebookutil.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/plugins/Facebook/FBConnectAuth.php b/plugins/Facebook/FBConnectAuth.php index f06dffaaab..d6d3786261 100644 --- a/plugins/Facebook/FBConnectAuth.php +++ b/plugins/Facebook/FBConnectAuth.php @@ -27,6 +27,10 @@ * @link http://status.net/ */ +if (!defined('STATUSNET')) { + exit(1); +} + require_once INSTALLDIR . '/plugins/Facebook/FacebookPlugin.php'; class FBConnectauthAction extends Action diff --git a/plugins/Facebook/facebookutil.php b/plugins/Facebook/facebookutil.php index e78856f7c4..fb70c51bc5 100644 --- a/plugins/Facebook/facebookutil.php +++ b/plugins/Facebook/facebookutil.php @@ -17,6 +17,10 @@ * along with this program. If not, see . */ +if (!defined('STATUSNET')) { + exit(1); +} + require_once INSTALLDIR . '/plugins/Facebook/facebook/facebook.php'; require_once INSTALLDIR . '/plugins/Facebook/facebookaction.php'; require_once INSTALLDIR . '/lib/noticelist.php';