Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/Horde.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @category Horde
* @license http://www.horde.org/licenses/lgpl21 LGPL
* @package Core
* @todo Framework 6.1 migrate to Horde\Browser\Browser or Horde\Browser\HttpUtils
*/

/**
Expand Down
1 change: 1 addition & 0 deletions lib/Horde/Core/Auth/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* @category Horde
* @license http://opensource.org/licenses/lgpl-2.1.php LGPL
* @package Core
* @todo Framework 6.1 migrate to Horde\Browser\Browser or Horde\Browser\HttpUtils
*/

use Horde\Core\Session\HordeSession;
Expand Down
1 change: 1 addition & 0 deletions lib/Horde/Core/Block/Layout/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @category Horde
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @package Core
* @todo Framework 6.1 migrate to Horde\Browser\Browser or Horde\Browser\HttpUtils
*/
class Horde_Core_Block_Layout_View extends Horde_Core_Block_Layout
{
Expand Down
1 change: 1 addition & 0 deletions lib/Horde/Core/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @category Horde
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @package Core
* @todo Framework 6.1 migrate to Horde\Browser\Browser or Horde\Browser\HttpUtils
*/
class Horde_Core_Browser extends Horde_Browser
{
Expand Down
1 change: 1 addition & 0 deletions lib/Horde/Core/Factory/Browser.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/**
* @category Horde
* @package Core
* @todo Framework 6.1 migrate to Horde\Browser\Browser or Horde\Browser\HttpUtils
*/
class Horde_Core_Factory_Browser extends Horde_Core_Factory_Injector
{
Expand Down
1 change: 1 addition & 0 deletions lib/Horde/Core/Factory/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*
* @category Horde
* @package Core
* @todo Framework 6.1 migrate to Horde\Browser\Browser or Horde\Browser\HttpUtils
* @author Michael Slusarz <slusarz@horde.org>
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
*/
Expand Down
1 change: 1 addition & 0 deletions lib/Horde/Core/Factory/MimeViewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* @copyright 2010-2017 Horde LLC
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @package Core
* @todo Framework 6.1 migrate to Horde\Browser\Browser or Horde\Browser\HttpUtils
*/

/**
Expand Down
1 change: 1 addition & 0 deletions lib/Horde/Core/HordeMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* @copyright 2009-2017 Horde LLC (http://www.horde.org/)
* @license http://www.horde.org/licenses/lgpl21 LGPL
* @package Core
* @todo Framework 6.1 migrate to Horde\Browser\Browser or Horde\Browser\HttpUtils
*/

/**
Expand Down
1 change: 1 addition & 0 deletions lib/Horde/Core/Mime/Headers/Received.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* @copyright 2014-2017 Horde LLC
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @package Core
* @todo Framework 6.1 migrate to Horde\Browser\Browser or Horde\Browser\HttpUtils
*/

/**
Expand Down
1 change: 1 addition & 0 deletions lib/Horde/Core/Mime/Viewer/Vcard.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @category Horde
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @package Core
* @todo Framework 6.1 migrate to Horde\Browser\Browser or Horde\Browser\HttpUtils
*/
class Horde_Core_Mime_Viewer_Vcard extends Horde_Mime_Viewer_Base
{
Expand Down
1 change: 1 addition & 0 deletions lib/Horde/Core/Notification/Event/Status.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* @category Horde
* @license http://www.horde.org/licenses/lgpl21 LGPL
* @package Core
* @todo Framework 6.1 migrate to Horde\Browser\Browser or Horde\Browser\HttpUtils
*/
class Horde_Core_Notification_Event_Status extends Horde_Notification_Event_Status
{
Expand Down
1 change: 1 addition & 0 deletions lib/Horde/Core/Tree/Renderer/Javascript.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @category Horde
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @package Core
* @todo Framework 6.1 migrate to Horde\Browser\Browser or Horde\Browser\HttpUtils
*/
class Horde_Core_Tree_Renderer_Javascript extends Horde_Core_Tree_Renderer_Html
{
Expand Down
1 change: 1 addition & 0 deletions lib/Horde/Core/Ui/VarRenderer/Html.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* @category Horde
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @package Core
* @todo Framework 6.1 migrate to Horde\Browser\Browser or Horde\Browser\HttpUtils
*/
class Horde_Core_Ui_VarRenderer_Html extends Horde_Core_Ui_VarRenderer
{
Expand Down
1 change: 1 addition & 0 deletions lib/Horde/Deprecated.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* @copyright 2013-2017 Horde LLC
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @package Core
* @todo Framework 6.1 migrate to Horde\Browser\Browser or Horde\Browser\HttpUtils
*/

/**
Expand Down
1 change: 1 addition & 0 deletions lib/Horde/PageOutput.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* @copyright 2012-2017 Horde LLC
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @package Core
* @todo Framework 6.1 migrate to Horde\Browser\Browser or Horde\Browser\HttpUtils
*/

/**
Expand Down
31 changes: 19 additions & 12 deletions lib/Horde/Registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
* @copyright 1999-2017 Horde LLC
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @package Core
* @todo Framework 6.1 migrate to Horde\Browser\Browser or Horde\Browser\HttpUtils
*/

use Horde\Browser\Browser;
use Horde\Browser\BrowserFamily;
use Horde\Core\Auth\AuthCredentialStore;
use Horde\Core\Config\ConfigMetadataProvider;
use Horde\Core\Config\Driver\DriverRepository;
Expand Down Expand Up @@ -392,10 +395,8 @@ public static function appInit($app, array $args = [])
switch ($args['session_control']) {
case 'netscape':
// Chicken/egg: Browser object doesn't exist yet.
// Can't use Horde_Core_Browser since it depends on registry to be
// configured.
$browser = new Horde_Browser();
if ($browser->isBrowser('mozilla')) {
$browser = new Browser();
if ($browser->isBrowser(BrowserFamily::Firefox)) {
$args['session_cache_limiter'] = 'private, must-revalidate';
}
break;
Expand Down Expand Up @@ -2817,7 +2818,7 @@ public function remoteHost()
*/
public function setAuth($authId, $credentials, array $options = [])
{
global $browser, $injector, $session;
global $injector, $session;

$app = empty($options['app'])
? 'horde'
Expand All @@ -2831,7 +2832,7 @@ public function setAuth($authId, $credentials, array $options = [])

/* Initial authentication to Horde. */
$session->set('horde', 'auth/authId', $authId);
$session->set('horde', 'auth/browser', $browser->getAgentString());
$session->set('horde', 'auth/browser', $injector->get(Browser::class)->getUserAgent());
if (!empty($options['change'])) {
$session->set('horde', 'auth/change', 1);
}
Expand Down Expand Up @@ -2871,7 +2872,7 @@ public function setAuth($authId, $credentials, array $options = [])
*/
public function checkExistingAuth($app = 'horde')
{
global $browser, $conf, $injector, $session;
global $conf, $injector, $session;

if (!empty($this->_cache['existing'][$app])) {
return true;
Expand All @@ -2888,11 +2889,17 @@ public function checkExistingAuth($app = 'horde')
return false;
}

if (!empty($conf['auth']['checkbrowser'])
&& ($session->get('horde', 'auth/browser') != $browser->getAgentString())) {
$injector->get(Horde_Core_Factory_Auth::class)->create()
->setError(Horde_Core_Auth_Application::REASON_BROWSER);
return false;
if (!empty($conf['auth']['checkbrowser'])) {
$browser = $injector->get(Browser::class);
$originalAgent = $session->get('horde', 'auth/browser');
if ($originalAgent !== $browser->getUserAgent()
&& !(in_array($_SERVER['REQUEST_METHOD'] ?? '', ['GET', 'HEAD'], true)
&& is_string($originalAgent)
&& $browser->isCompanionOf($originalAgent))) {
$injector->get(Horde_Core_Factory_Auth::class)->create()
->setError(Horde_Core_Auth_Application::REASON_BROWSER);
return false;
}
}

if (!empty($conf['session']['max_time'])
Expand Down
1 change: 1 addition & 0 deletions lib/Horde/Themes/Css.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
* @category Horde
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @package Core
* @todo Framework 6.1 migrate to Horde\Browser\Browser or Horde\Browser\HttpUtils
*/

use Horde\Log\Logger;
Expand Down
1 change: 1 addition & 0 deletions lib/Horde/Themes/Css/Compress.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* @copyright 2014-2026 Horde LLC
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @package Core
* @todo Framework 6.1 migrate to Horde\Browser\Browser or Horde\Browser\HttpUtils
*/

use Horde\CssMinify\CssParserMinifier;
Expand Down
1 change: 1 addition & 0 deletions lib/Horde/Themes/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* @copyright 2010-2017 Horde LLC
* @license http://www.horde.org/licenses/lgpl21 LGPL
* @package Core
* @todo Framework 6.1 migrate to Horde\Browser\Browser or Horde\Browser\HttpUtils
*/

/**
Expand Down
1 change: 1 addition & 0 deletions src/DefaultInjectorBindings.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* @copyright 2026 The Horde Project
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
* @package Core
* @todo Framework 6.1 migrate to Horde\Browser\Browser or Horde\Browser\HttpUtils
*/

namespace Horde\Core;
Expand Down
2 changes: 2 additions & 0 deletions src/Horde.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
*
* See the enclosed file LICENSE for license information (LGPL). If you
* did not receive this file, see http://www.horde.org/licenses/lgpl21.
*
* @todo Framework 6.1 migrate to Horde\Browser\Browser or Horde\Browser\HttpUtils
*/

namespace Horde\Core;
Expand Down
Loading
Loading