Skip to content

Commit

Permalink
Revert "[mms] Added session_version hook."
Browse files Browse the repository at this point in the history
This reverts commit d4e52cb.

Conflicts:
	framework/Core/package.xml

Nevermind.  As was correctly pointed out to me, this can be handled via
the existing $conf['session']['name'] parameter.
  • Loading branch information
slusarz committed Jan 30, 2014
1 parent 251f498 commit 087397d
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 40 deletions.
18 changes: 1 addition & 17 deletions framework/Core/lib/Horde/Session.php
Expand Up @@ -38,7 +38,6 @@ class Horde_Session
const MODIFIED = '_m'; /* @deprecated */
const PRUNE = '_p';
const REGENERATE = '_r'; /* @since 2.5.0 */
const VERSION = '_v'; /* @since 2.12.0 */

const TYPE_ARRAY = 1;
const TYPE_OBJECT = 2;
Expand Down Expand Up @@ -197,8 +196,6 @@ public function setup($start = true, $cache_limiter = null,
*/
public function start()
{
global $injector, $registry;

/* Limit session ID to 32 bytes. Session IDs are NOT cryptographically
* secure hashes. Instead, they are nothing more than a way to
* generate random strings. */
Expand All @@ -209,24 +206,11 @@ public function start()
$this->_active = true;
$this->_data = &$_SESSION;

try {
$version = $injector->getInstance('Horde_Core_Hooks')->callHook('session_version', 'horde');
if (!isset($this->_data[self::VERSION])) {
$this->_data[self::VERSION] = $version;
$this->sessionHandler->changed = true;
} elseif ($version != $this->_data[self::VERSION]) {
throw new Horde_Exception_AuthenticationFailure(
'Session invalidated due to version ID change.',
Horde_Auth::REASON_SESSION
);
}
} catch (Horde_Exception_HookNotSet $e) {}

/* We have reopened a session. Check to make sure that authentication
* status has not changed in the meantime. */
if (!$this->_readonly &&
!is_null($this->_relogin) &&
(($registry->getAuth() !== false) !== $this->_relogin)) {
(($GLOBALS['registry']->getAuth() !== false) !== $this->_relogin)) {
Horde::log('Previous session attempted to be reopened after authentication status change. All session modifications will be ignored.', 'DEBUG');
$this->_readonly = true;
}
Expand Down
2 changes: 0 additions & 2 deletions framework/Core/package.xml
Expand Up @@ -40,7 +40,6 @@
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Allow jQuery Mobile script to be packaged in same file as other jquery code.
* [mms] Support session_version Horde hook.
* [mms] Move configuration loading code to Horde_Registry_Loadconfig class.
* [mjr] Fix saving S/MIME signed emails sent via ActiveSync to sent folder (Bug #12936).
* [rla] Add method to get conf.xml defaults when conf.php is present for (Request #12923).
Expand Down Expand Up @@ -3304,7 +3303,6 @@
<license uri="http://www.horde.org/licenses/lgpl21">LGPL-2.1</license>
<notes>
* [mms] Allow jQuery Mobile script to be packaged in same file as other jquery code.
* [mms] Support session_version Horde hook.
* [mms] Move configuration loading code to Horde_Registry_Loadconfig class.
* [mjr] Fix saving S/MIME signed emails sent via ActiveSync to sent folder (Bug #12936).
* [rla] Add method to get conf.xml defaults when conf.php is present for (Request #12923).
Expand Down
14 changes: 0 additions & 14 deletions horde/config/hooks.php.dist
Expand Up @@ -668,20 +668,6 @@ class Horde_Hooks
// }


/**
* Define a unique session version identifier that, when changed, will
* cause all existing (non-matching) sessions to become invalidated when
* subsequently accessed.
*
* @return string Unique session version identifier.
*/
// public function session_version()
// {
// // Example: Sessions become invalidated each week.
// return date('W-y');
// }


/**
* Modify the browser object.
*
Expand Down
1 change: 0 additions & 1 deletion horde/docs/CHANGES
Expand Up @@ -2,7 +2,6 @@
v5.2.0-git
----------

[mms] Added session_version hook.
[rla] Add modular horde-cli and module for conf.php editing (Request #12923).
[mms] By default, enforce maximum storage size on preferences values.
[mms] Support UglifyJS for compressing javascript.
Expand Down
6 changes: 1 addition & 5 deletions horde/docs/UPGRADING
Expand Up @@ -69,11 +69,7 @@ The default value for the following options were changed::
Hooks (hooks.php)
-----------------

The following hooks have been added::

session_version

New ActiveSync related hooks have been added::
New ActiveSync related hooks have been added:

activesync_create_device
activesync_device_check
Expand Down
1 change: 0 additions & 1 deletion horde/package.xml
Expand Up @@ -39,7 +39,6 @@
</stability>
<license uri="http://www.horde.org/licenses/lgpl">LGPL-2</license>
<notes>
* [mms] Added session_version hook.
* [rla] Add modular horde-cli and module for conf.php editing (Request #12923).
* [mms] By default, enforce maximum storage size on preferences values.
* [mms] Support UglifyJS for compressing javascript.
Expand Down

0 comments on commit 087397d

Please sign in to comment.