Merge branch 'saas-dev' into saas-dev-publishing
Conflicts: airtime_mvc/application/Bootstrap.php airtime_mvc/application/controllers/plugins/Acl_plugin.php
This commit is contained in:
commit
12f6536e74
32 changed files with 4672 additions and 326 deletions
|
@ -12,4 +12,12 @@ class SecurityHelper {
|
|||
}
|
||||
return $arr;
|
||||
}
|
||||
|
||||
public static function verifyCSRFToken($observedToken) {
|
||||
$current_namespace = new Zend_Session_Namespace('csrf_namespace');
|
||||
$observed_csrf_token = $observedToken;
|
||||
$expected_csrf_token = $current_namespace->authtoken;
|
||||
|
||||
return ($observed_csrf_token == $expected_csrf_token);
|
||||
}
|
||||
}
|
13
airtime_mvc/application/common/SessionHelper.php
Normal file
13
airtime_mvc/application/common/SessionHelper.php
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
class SessionHelper
|
||||
{
|
||||
public static function reopenSessionForWriting() {
|
||||
//PHP will send double Set-Cookie headers if we reopen the
|
||||
//session for writing, and this breaks IE8 and some other browsers.
|
||||
//This hacky workaround prevents double headers. Background here:
|
||||
// https://bugs.php.net/bug.php?id=38104
|
||||
ini_set('session.cache_limiter', null);
|
||||
session_start(); // Reopen the session for writing (without resending the Set-Cookie header)
|
||||
}
|
||||
}
|
|
@ -113,6 +113,9 @@ final class TaskManager {
|
|||
* otherwise false
|
||||
*/
|
||||
private function _isUserSessionRequest() {
|
||||
if (!Zend_Session::isStarted()) {
|
||||
return false;
|
||||
}
|
||||
$auth = Zend_Auth::getInstance();
|
||||
$data = $auth->getStorage()->read();
|
||||
return !empty($data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue