Changeset 5419 in subversion
- Timestamp:
- Nov 13, 2011 7:02:18 AM (19 months ago)
- Location:
- trunk/plugins/password
- Files:
-
- 4 edited
-
config.inc.php.dist (modified) (1 diff)
-
drivers/sql.php (modified) (1 diff)
-
package.xml (modified) (3 diffs)
-
password.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/password/config.inc.php.dist
r4726 r5419 48 48 $rcmail_config['password_query'] = 'SELECT update_passwd(%c, %u)'; 49 49 50 // By default domains in variables are using unicode. 51 // Enable this option to use punycoded names 52 $rcmail_config['password_idn_ascii'] = false; 53 50 54 // Path for dovecotpw (if not in $PATH) 51 55 // $rcmail_config['password_dovecotpw'] = '/usr/local/sbin/dovecotpw'; -
trunk/plugins/password/drivers/sql.php
r5367 r5419 131 131 } 132 132 133 $local_part = $rcmail->user->get_username('local'); 134 $domain_part = $rcmail->user->get_username('domain'); 135 $username = $_SESSION['username']; 136 $host = $_SESSION['imap_host']; 137 138 // convert domains to/from punnycode 139 if ($rcmail->config->get('password_idn_ascii')) { 140 $domain_part = rcube_idn_to_ascii($domain_part); 141 $username = rcube_idn_to_ascii($username); 142 $host = rcube_idn_to_ascii($host); 143 } 144 else { 145 $domain_part = rcube_idn_to_utf8($domain_part); 146 $username = rcube_idn_to_utf8($username); 147 $host = rcube_idn_to_utf8($host); 148 } 149 133 150 // at least we should always have the local part 134 $sql = str_replace('%l', $db->quote($ rcmail->user->get_username('local'), 'text'), $sql);135 $sql = str_replace('%d', $db->quote($ rcmail->user->get_username('domain'), 'text'), $sql);136 $sql = str_replace('%u', $db->quote($ _SESSION['username'],'text'), $sql);137 $sql = str_replace('%h', $db->quote($ _SESSION['imap_host'],'text'), $sql);151 $sql = str_replace('%l', $db->quote($local_part, 'text'), $sql); 152 $sql = str_replace('%d', $db->quote($domain_part, 'text'), $sql); 153 $sql = str_replace('%u', $db->quote($username, 'text'), $sql); 154 $sql = str_replace('%h', $db->quote($host, 'text'), $sql); 138 155 139 156 $res = $db->query($sql, $sql_vars); -
trunk/plugins/password/package.xml
r5367 r5419 16 16 <active>yes</active> 17 17 </lead> 18 <date> 2011-10-26</date>19 <time> 12:00</time>18 <date></date> 19 <time></time> 20 20 <version> 21 <release> 2.3</release>21 <release></release> 22 22 <api>1.6</api> 23 23 </version> … … 28 28 <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> 29 29 <notes> 30 - When old and new passwords are the same, do nothing, return success (#1487823) 31 - Fixed Samba password hashing in 'ldap' driver 32 - Added 'password_change' hook for plugin actions after successful password change 33 - Fixed bug where 'doveadm pw' command was used as dovecotpw utility 34 - Improve generated crypt() passwords (#1488136) 30 - Added option to use punycode or unicode for domain names (#1488103) 35 31 </notes> 36 32 <contents> … … 266 262 </notes> 267 263 </release> 264 <release> 265 <date>2011-10-26</date> 266 <time>12:00</time> 267 <version> 268 <release>2.3</release> 269 <api>1.6</api> 270 </version> 271 <stability> 272 <release>stable</release> 273 <api>stable</api> 274 </stability> 275 <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license> 276 <notes> 277 - When old and new passwords are the same, do nothing, return success (#1487823) 278 - Fixed Samba password hashing in 'ldap' driver 279 - Added 'password_change' hook for plugin actions after successful password change 280 - Fixed bug where 'doveadm pw' command was used as dovecotpw utility 281 - Improve generated crypt() passwords (#1488136) 282 </notes> 283 </release> 268 284 </changelog> 269 285 </package> -
trunk/plugins/password/password.php
r5036 r5419 224 224 $config = rcmail::get_instance()->config; 225 225 $driver = $this->home.'/drivers/'.$config->get('password_driver', 'sql').'.php'; 226 226 227 227 if (!is_readable($driver)) { 228 228 raise_error(array( … … 234 234 return $this->gettext('internalerror'); 235 235 } 236 236 237 237 include($driver); 238 238 … … 271 271 272 272 return $reason; 273 } 273 } 274 274 }
Note: See TracChangeset
for help on using the changeset viewer.
