pluf2

pluf2 Commit Details


Date:2008-12-05 16:40:35 (16 years 16 days ago)
Author:Loic d'Anterroches
Branch:master
Commit:3fc7bb73ae987b1a5e050c15ba2c932edc941dbb
Parents: 83f2d1d2e2f4c58676e27834af08f2b79b9301e5
Message:Cleaned little things.

Changes:

File differences

src/Pluf/Middleware/Session.php
5858
5959
6060
61
61
6262
6363
6464
......
126126
127127
128128
129
129
130130
131131
132132
......
140140
141141
142142
143
143
144144
145145
146146
......
157157
158158
159159
160
160
161161
162162
163163
return false;
}
try {
$data = $this->_decodeData($request->COOKIE[$session->cookie_name]);
$data = self::_decodeData($request->COOKIE[$session->cookie_name]);
} catch (Exception $e) {
$request->user = $user;
$request->session = $session;
$data[$request->user->session_key] = $request->user->id;
}
$data['Pluf_Session_key'] = $request->session->session_key;
$response->cookies[$request->session->cookie_name] = $this->_encodeData($data);
$response->cookies[$request->session->cookie_name] = self::_encodeData($data);
}
if ($request->session->set_test_cookie != null) {
$response->cookies[$request->session->test_cookie_name] = $request->session->test_cookie_value;
* @param mixed Data to encode
* @return string Encoded data ready for the cookie
*/
function _encodeData($data)
public static function _encodeData($data)
{
if ('' == ($key = Pluf::f('secret_key'))) {
throw new Exception('Security error: "secret_key" is not set in the configuration file.');
* @param string Encoded data
* @return mixed Decoded data
*/
function _decodeData($encoded_data)
public static function _decodeData($encoded_data)
{
$check = substr($encoded_data, -32);
$base64_data = substr($encoded_data, 0, strlen($encoded_data)-32);
src/Pluf/Middleware/Tidy.php
5353
5454
5555
56
56
5757
5858
5959
return $response;
}
$ok = false;
$cts = array('text/html', 'text/html', 'application/xhtml+xml');
$cts = array('text/html', 'application/xhtml+xml');
foreach ($cts as $ct) {
if (false !== strripos($response->headers['Content-Type'], $ct)) {
$ok = true;

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.06183s using 13 queries.