Changeset 6d94ab3 in github


Ignore:
Timestamp:
Sep 26, 2010 11:06:55 AM (3 years ago)
Author:
thomascube <thomas@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
Children:
a8e1095
Parents:
8603bbb
Message:

Only lower-case user name if first login attempt failed (#1486393) + fix test

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • CHANGELOG

    r8603bbb r6d94ab3  
    22=========================== 
    33 
     4- Only lower-case user name if first login attempt failed (#1486393) 
    45- Make alias setting in squirrelmail_usercopy plugin configurable (patch by pommi, #1487007) 
    56- Prevent from saving a non-existing skin path in user prefs (#1486936) 
  • program/include/rcmail.php

    re019f2d r6d94ab3  
    612612        $username = $virtuser; 
    613613 
    614     // lowercase username if it's an e-mail address (#1484473) 
    615     if (strpos($username, '@')) 
    616       $username = mb_strtolower($username); 
    617  
    618614    // user already registered -> overwrite username 
    619615    if ($user = rcube_user::query($username, $host)) 
     
    623619      $this->imap_init(); 
    624620 
     621    // try IMAP login 
     622    if (!($imap_login = $this->imap->connect($host, $username, $pass, $imap_port, $imap_ssl))) { 
     623      // lowercase username if it's an e-mail address (#1484473) 
     624      $username_lc = mb_strtolower($username); 
     625      if ($username_lc != $username && ($imap_login = $this->imap->connect($host, $username_lc, $pass, $imap_port, $imap_ssl))) 
     626        $username = $username_lc; 
     627    } 
     628 
    625629    // exit if IMAP login failed 
    626     if (!($imap_login  = $this->imap->connect($host, $username, $pass, $imap_port, $imap_ssl))) 
     630    if (!$imap_login) 
    627631      return false; 
    628632 
     
    647651        raise_error(array( 
    648652          'code' => 600, 'type' => 'php', 
    649               'file' => __FILE__, 'line' => __LINE__, 
     653          'file' => __FILE__, 'line' => __LINE__, 
    650654          'message' => "Failed to create a user record. Maybe aborted by a plugin?" 
    651655          ), true, false); 
  • tests/modcss.php

    r63d4b121 r6d94ab3  
    1919    $mod = rcmail_mod_css_styles($css, 'rcmbody'); 
    2020 
    21     $this->assertPattern('/#rcmbody div.rcmBody\s+\{/', $mod, "Replace body style definition"); 
     21    $this->assertPattern('/#rcmbody\s+\{/', $mod, "Replace body style definition"); 
    2222    $this->assertPattern('/#rcmbody h1\s\{/', $mod, "Prefix tag styles (single)"); 
    2323    $this->assertPattern('/#rcmbody h1, #rcmbody h2, #rcmbody h3, #rcmbody textarea\s+\{/', $mod, "Prefix tag styles (multiple)"); 
Note: See TracChangeset for help on using the changeset viewer.