From e2435f25d90913455e0b8ffd92fb0918cf6f376f Mon Sep 17 00:00:00 2001 From: Joseph Warner Date: Thu, 11 Jul 2013 14:54:00 -0400 Subject: [feature/auth-refactor] Check that providers implement auth interface PHPBB3-9734 --- phpBB/includes/session.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'phpBB/includes/session.php') diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 66bf053f7d..e0585b1523 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -404,6 +404,12 @@ class phpbb_session $method = basename(trim($config['auth_method'])); $provider = $phpbb_container->get('auth.provider.' . $method); + + if (!($provider instanceof phpbb_auth_provider_interface)) + { + throw new \RuntimeException($provider . ' must implement phpbb_auth_provider_interface'); + } + $ret = $provider->validate_session($this->data); if ($ret !== null && !$ret) { -- cgit v1.2.1