Changeset 372:cb84f40f1f4b
- Timestamp:
- 06/15/11 09:06:08 (14 years ago)
- Branch:
- default
- Parents:
- 371:38d68ab49087 (diff), 370:527cc81ceccf (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
r368 r372 1 Dotclear 2.4.0 - ongoing dev 2 =========================================================== 3 * handling of postgres non default schemas (db_prefix = 'schema.prefix') 4 1 5 Dotclear 2.3.1 - 2001-06-14 2 6 =========================================================== -
CHANGELOG
r343 r372 3 3 * handling of postgres non default schemas (db_prefix = 'schema.prefix') 4 4 5 Dotclear 2.3.1 - ongoing dev5 Dotclear 2.3.1 - 2001-06-14 6 6 =========================================================== 7 7 * Updated makefile for cleaner distrib. … … 9 9 * Misc JS & CSS cleaning. 10 10 * Import/Export preferences-related bugfix. 11 * Administrative mail address is now configurable. 12 * Security: one minor fix and changes for two potential problems. Thanks to Jeremie Boutoille 11 13 12 14 Dotclear 2.3.0 - 2011-05-16 -
admin/auth.php
r366 r372 143 143 } 144 144 145 # Check login informations 146 $check_user = false; 147 if (isset($data['cookie_admin']) && strlen($data['cookie_admin']) == 104) 145 # Check login informations 146 $check_user = false; 147 if (isset($data['cookie_admin']) && strlen($data['cookie_admin']) == 104) 148 { 149 $user_id = substr($data['cookie_admin'],40); 150 $user_id = @unpack('a32',@pack('H*',$user_id)); 151 if (is_array($user_id)) 148 152 { 149 $user_id = substr($data['cookie_admin'],40); 150 $user_id = @unpack('a32',@pack('H*',$user_id)); 151 if (is_array($user_id)) 152 { 153 $user_id = $user_id[1]; 154 $user_key = substr($data['cookie_admin'],0,40); 155 $check_user = $core->auth->checkUser($user_id,null,$user_key) === true; 156 } 157 } 153 $user_id = $user_id[1]; 154 $user_key = substr($data['cookie_admin'],0,40); 155 $check_user = $core->auth->checkUser($user_id,null,$user_key) === true; 156 } 157 } 158 158 159 159 if (!$core->auth->allowPassChange() || !$check_user) { -
admin/auth.php
r356 r372 23 23 $dlang = http::getAcceptLanguage(); 24 24 $dlang = ($dlang == '' ? 'en' : $dlang); 25 if ($dlang != 'en' )25 if ($dlang != 'en' && preg_match('/^[a-z]{2}(-[a-z]{2})?$/',$dlang)) 26 26 { 27 27 l10n::set(dirname(__FILE__).'/../locales/'.$dlang.'/main'); … … 90 90 $page_url.'?akey='.$recover_key; 91 91 92 $headers[] = 'From: dotclear@'.$_SERVER['HTTP_HOST'];92 $headers[] = 'From: '.(defined('DC_ADMIN_MAILFROM') && DC_ADMIN_MAILFROM ? DC_ADMIN_MAILFROM : 'dotclear@local'); 93 93 $headers[] = 'Content-Type: text/plain; charset=UTF-8;'; 94 94 … … 126 126 } 127 127 # Change password and retry to log 128 elseif ($change_pwd and $data = unserialize(base64_decode($_POST['login_data']))) 129 { 128 elseif ($change_pwd) 129 { 130 try 131 { 132 $tmp_data = explode('/',$_POST['login_data']); 133 if (count($tmp_data) != 3) { 134 throw new Exception(); 135 } 136 $data = array( 137 'user_id'=>base64_decode($tmp_data[0]), 138 'cookie_admin'=>$tmp_data[1], 139 'user_remember'=>$tmp_data[2]=='1' 140 ); 141 if ($data['user_id'] === false) { 142 throw new Exception(); 143 } 144 130 145 # Check login informations 131 146 $check_user = false; … … 142 157 } 143 158 144 try145 {146 159 if (!$core->auth->allowPassChange() || !$check_user) { 147 160 $change_pwd = false; … … 166 179 $_SESSION['sess_browser_uid'] = http::browserUID(DC_MASTER_KEY); 167 180 168 if (!empty($data['blog_id'])) { 169 $_SESSION['sess_blog_id'] = $data['blog_id']; 170 } 171 172 if (!empty($data['user_remember'])) 181 if ($data['user_remember']) 173 182 { 174 183 setcookie('dc_admin',$data['cookie_admin'],strtotime('+15 days'),'','',DC_ADMIN_SSL); … … 193 202 if ($check_user && $core->auth->mustChangePassword()) 194 203 { 195 $login_data = base64_encode(serialize(array( 196 'user_id'=>$user_id, 197 'cookie_admin'=>$cookie_admin, 198 'blog_id'=>(!empty($_POST['blog']) ? $_POST['blog'] : ''), 199 'user_remember'=>!empty($_POST['user_remember']) 200 ))); 204 $login_data = join('/',array( 205 base64_encode($user_id), 206 $cookie_admin, 207 empty($_POST['user_remember'])?'0':'1' 208 )); 201 209 202 210 if (!$core->auth->allowPassChange()) { -
inc/prepend.php
r370 r372 118 118 # Constants 119 119 define('DC_ROOT',path::real(dirname(__FILE__).'/..')); 120 define('DC_VERSION','2. 3.2-dev');120 define('DC_VERSION','2.4.0-dev'); 121 121 define('DC_DIGESTS',dirname(__FILE__).'/digests'); 122 122 define('DC_L10N_ROOT',dirname(__FILE__).'/../locales');
Note: See TracChangeset
for help on using the changeset viewer.