Skip to content

Commit

Permalink
Merge branch 'master' into horde_5_2
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Nov 13, 2013
2 parents ce0a3f7 + f200f28 commit 8926145
Show file tree
Hide file tree
Showing 65 changed files with 1,163 additions and 1,139 deletions.
22 changes: 17 additions & 5 deletions framework/Autoloader_Cache/package.xml
Expand Up @@ -16,10 +16,9 @@
<email>slusarz@horde.org</email>
<active>yes</active>
</developer>
<date>2013-08-20</date>
<time>18:43:48</time>
<date>2013-11-12</date>
<version>
<release>2.0.6</release>
<release>2.0.7</release>
<api>1.0.0</api>
</version>
<stability>
Expand All @@ -28,7 +27,7 @@
</stability>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Support msgpack for serializing the map lookup.
*
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -291,11 +290,24 @@
<stability>
<release>stable</release>
<api>stable</api></stability>
<date>2013-08-20</date>
<date>2013-11-12</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Support msgpack for serializing the map lookup.
</notes>
</release>
<release>
<version>
<release>2.0.7</release>
<api>1.0.0</api></version>
<stability>
<release>stable</release>
<api>stable</api></stability>
<date>2013-11-12</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
</notes>
</release>
</changelog>
</package>
8 changes: 5 additions & 3 deletions framework/Core/lib/Horde/Core/Ajax/Application.php
Expand Up @@ -82,11 +82,13 @@ public function __construct($app, Horde_Variables $vars, $action = null,

$ob = $this->_getHandler();

/* Non-authenticated actions MUST occur in a handler. */
if (!$ob && !$registry->currentProcessAuth()) {
throw new Horde_Exception('Accessing AJAX action without being authenticated.');
}

/* Check authentication/token. */
if ($ob && !$ob->external($action)) {
if (!$registry->currentProcessAuth()) {
throw new Horde_Exception('Accessing AJAX action without being authenticated.');
}
$session->checkToken($token);
}

Expand Down
13 changes: 13 additions & 0 deletions framework/Core/lib/Horde/Core/Ajax/Response/HordeCore/NoAuth.php
Expand Up @@ -39,6 +39,19 @@ public function __construct($app, $error = Horde_Auth::REASON_FAILED)
$this->_error = $error;
}

/**
*/
public function send()
{
global $registry;

if (!empty($registry->authException)) {
$registry->getApiInstance($this->_app, 'application')->appInitFailure($registry->authException);
}

parent::send();
}

/**
*/
protected function _jsonData()
Expand Down
Expand Up @@ -31,6 +31,19 @@ public function __construct($app)
$this->_app = $app;
}

/**
*/
public function send()
{
global $registry;

if (!empty($registry->authException)) {
$registry->getApiInstance($this->_app, 'application')->appInitFailure($registry->authException);
}

parent::send();
}

/**
*/
protected function _jsonData()
Expand Down
13 changes: 13 additions & 0 deletions framework/Core/lib/Horde/Registry.php
Expand Up @@ -50,6 +50,18 @@ class Horde_Registry implements Horde_Shutdown_Task
*/
public $applications = array();

/**
* Original authentication exception. Set if 'fallback' auth is used, and
* authentication fails.
*
* @since 2.11.0
* @todo Fix this up for H6 (framework needs to do better job of
* supporting bootstrapping before authentication).
*
* @var Exception
*/
public $authException;

/**
* A flag that is set once the basic horde application has been
* minimally configured.
Expand Down Expand Up @@ -283,6 +295,7 @@ static public function appInit($app, array $args = array())
} catch (Horde_Exception_PushApp $e) {
if ($fallback_auth) {
$args['authentication'] = 'none';
$registry->authException = $e;
return self::appInit($app, $args);
}

Expand Down
26 changes: 17 additions & 9 deletions framework/Core/package.xml
Expand Up @@ -28,9 +28,9 @@
<email>mrubinsk@horde.org</email>
<active>yes</active>
</developer>
<date>2013-11-06</date>
<date>2013-11-12</date>
<version>
<release>2.11.0</release>
<release>2.11.1</release>
<api>2.11.0</api>
</version>
<stability>
Expand All @@ -39,12 +39,7 @@
</stability>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Fix hiding preferences if they are contained within a prefs container.
* [mms] Added standardized/normalized mousewheelY javascript event handling to HordeCore.
* [mms] Add nonce generation/checking to Horde_Session.
* [mms] Application hook methods moved from Horde:: to Horde_Core_Hooks::.
* [mms] Add &apos;fallback&apos; option for the Horde_Registry#appInit() &apos;authentication&apos; parameter.
* [mms] Fix deauthenticating when a system-level logout event occurs.
*
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -3226,7 +3221,7 @@
<stability>
<release>stable</release>
<api>stable</api></stability>
<date>2013-11-06</date>
<date>2013-11-12</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Fix hiding preferences if they are contained within a prefs container.
Expand All @@ -3237,5 +3232,18 @@
* [mms] Fix deauthenticating when a system-level logout event occurs.
</notes>
</release>
<release>
<version>
<release>2.11.1</release>
<api>2.11.0</api></version>
<stability>
<release>stable</release>
<api>stable</api></stability>
<date>2013-11-12</date>
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
*
</notes>
</release>
</changelog>
</package>

0 comments on commit 8926145

Please sign in to comment.