diff --git a/conf/ConfigureFromEnv.php b/conf/ConfigureFromEnv.php index e650563f6..ba5dba541 100644 --- a/conf/ConfigureFromEnv.php +++ b/conf/ConfigureFromEnv.php @@ -54,10 +54,6 @@ if(defined('SS_ENVIRONMENT_FILE')) { } } -if(defined('SS_USE_BASIC_AUTH') && SS_USE_BASIC_AUTH) { - BasicAuth::enable(); -} - if(defined('SS_ENVIRONMENT_TYPE')) { Director::set_environment_type(SS_ENVIRONMENT_TYPE); } diff --git a/email/Email.php b/email/Email.php index a55d43ce4..d421466df 100755 --- a/email/Email.php +++ b/email/Email.php @@ -634,7 +634,7 @@ class Email_Template extends Email { class Email_BounceHandler extends Controller { function init() { - BasicAuth::disable(); + BasicAuth::protect_entire_site(false); parent::init(); } diff --git a/security/BasicAuth.php b/security/BasicAuth.php index 00a190a58..649eb380f 100755 --- a/security/BasicAuth.php +++ b/security/BasicAuth.php @@ -90,7 +90,7 @@ class BasicAuth extends Object { * @deprecated Use BasicAuth::protect_entire_site() instead. */ static function enable() { - user_error("BasicAuth::enable() is deprated. Use BasicAuth::protect_entire_site() instead.", E_USER_NOTICE); + user_error("BasicAuth::enable() is deprecated. Use BasicAuth::protect_entire_site() instead.", E_USER_NOTICE); return self::protect_entire_site(); } @@ -98,7 +98,7 @@ class BasicAuth extends Object { * @deprecated Use BasicAuth::protect_entire_site(false) instead. */ static function disable() { - user_error("BasicAuth::disable() is deprated. Use BasicAuth::protect_entire_site(false) instead.", E_USER_NOTICE); + user_error("BasicAuth::disable() is deprecated. Use BasicAuth::protect_entire_site(false) instead.", E_USER_NOTICE); return self::protect_entire_site(false); } diff --git a/tests/WebserverRoutingTest.php b/tests/WebserverRoutingTest.php index 7e0649f59..2f5079046 100644 --- a/tests/WebserverRoutingTest.php +++ b/tests/WebserverRoutingTest.php @@ -39,7 +39,7 @@ class WebserverRoutingTest extends SapphireTest { */ class WebserverRoutingTest_Controller extends Controller { function index() { - BasicAuth::disable(); + BasicAuth::protect_entire_site(false); return "ok"; } diff --git a/tests/api/RestfulServiceTest.php b/tests/api/RestfulServiceTest.php index 638acf997..c1f66ea1b 100644 --- a/tests/api/RestfulServiceTest.php +++ b/tests/api/RestfulServiceTest.php @@ -95,7 +95,7 @@ class RestfulServiceTest extends SapphireTest { class RestfulServiceTest_Controller extends Controller { public function index() { ContentNegotiator::disable(); - BasicAuth::disable(); + BasicAuth::protect_entire_site(false); $request = ''; foreach ($this->request->requestVars() as $key=>$value) { @@ -126,7 +126,7 @@ XML; public function invalid() { ContentNegotiator::disable(); - BasicAuth::disable(); + BasicAuth::protect_entire_site(false); $out = <<