Changeset 79742f0 in github


Ignore:
Timestamp:
May 24, 2012 3:07:56 PM (12 months ago)
Author:
Thomas B. <thomas@…>
Branches:
master, HEAD, dev-browser-capabilities, pdo
Children:
c083969
Parents:
4a5c1f5 (diff), b332e79 (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.
Message:

Merge pull request #7 from raoulbhatia/master

improve .htaccess security rules

Files:
9 edited

Legend:

Unmodified
Added
Removed
  • .htaccess

    ra93f39a rb332e79  
    3131RewriteRule ^favicon\.ico$ skins/default/images/favicon.ico 
    3232# security rules 
    33 RewriteRule .git/ - [F] 
    34 RewriteRule ^README|INSTALL|LICENSE|SQL|bin|CHANGELOG$ - [F] 
     33RewriteRule .git - [F] 
     34RewriteRule ^/?(README(.md)?|INSTALL|LICENSE|SQL|bin|CHANGELOG)$ - [F] 
    3535</IfModule> 
    3636 
  • plugins/hide_blockquote/hide_blockquote.js

    r85a6173 r4a5c1f5  
    2525      .text(res[0]); 
    2626 
    27     link = $('<span class="blockquote-link">') 
     27    link = $('<span class="blockquote-link"></span>') 
    2828      .css({position: 'absolute', 'z-Index': 2}) 
    2929      .text(rcmail.gettext('hide_blockquote.show')) 
  • plugins/hide_blockquote/skins/default/style.css

    r85a6173 r4a5c1f5  
    1818  border-bottom-right-radius: 6px; 
    1919  border-bottom-left-radius: 6px; 
    20   background: #fff; 
     20  background: #f8f8f8; 
    2121  background: -moz-linear-gradient(top, #f8f8f8 0%, #e8e8e8 100%); 
    2222  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#e8e8e8)); 
  • plugins/password/config.inc.php.dist

    r48e9c14 r6ffe0be  
    309309// 6: username_domain 
    310310// 7: domain_username 
    311 $rcmail_config['password_virtualmin_format'] = 0; 
     311// 8: username@domain; mbox.username 
     312$rcmail_config['password_virtualmin_format'] = 8; 
    312313 
    313314 
  • plugins/password/drivers/virtualmin.php

    r48e9c14 r6ffe0be  
    4949            $domain = $pieces[0]; 
    5050            break; 
     51                case 8: // domain taken from alias, username left as it was 
     52                        $email = $rcmail->user->data['alias']; 
     53                        $domain = substr(strrchr($email, "@"), 1); 
     54                        break 
    5155        default: // username@domain 
    5256            $domain = substr(strrchr($username, "@"), 1); 
  • program/include/rcmail.php

    r041c93c rb97f21a  
    20112011    } 
    20122012 
     2013    public function imap_init() 
     2014    { 
     2015        return $this->storage_init(); 
     2016    } 
     2017 
    20132018    /** 
    20142019     * Connect to the mail storage server with stored session data 
  • program/include/rcube_imap_cache.php

    r041c93c r7eb4f2e  
    312312            $result[$uid] = $this->build_message($sql_arr); 
    313313 
    314             // save memory, we don't need message body here (?) 
    315             $result[$uid]->body = null; 
    316  
    317314            if (!empty($result[$uid])) { 
     315                // save memory, we don't need message body here (?) 
     316                $result[$uid]->body = null; 
     317 
    318318                unset($msgs[$uid]); 
    319319            } 
     
    11471147    } 
    11481148} 
     1149 
     1150// for backward compat. 
     1151class rcube_mail_header extends rcube_message_header { } 
  • program/include/rcube_imap_generic.php

    r041c93c r43918dd2  
    2626 +-----------------------------------------------------------------------+ 
    2727*/ 
    28  
    29 // for backward compat. 
    30 class rcube_mail_header extends rcube_message_header { } 
    3128 
    3229 
  • program/include/rcube_session.php

    r041c93c r4d708e6  
    3838  private $gc_handlers = array(); 
    3939  private $cookiename = 'roundcube_sessauth'; 
    40   private $vars = false; 
     40  private $vars; 
    4141  private $key; 
    4242  private $now; 
     
    135135      $this->key     = $key; 
    136136 
    137       if (!empty($this->vars)) 
    138         return $this->vars; 
    139     } 
    140  
    141     return false; 
     137      return !empty($this->vars) ? (string) $this->vars : ''; 
     138    } 
     139 
     140    return null; 
    142141  } 
    143142 
     
    158157    // no session row in DB (db_read() returns false) 
    159158    if (!$this->key) { 
    160       $oldvars = false; 
     159      $oldvars = null; 
    161160    } 
    162161    // use internal data from read() for fast requests (up to 0.5 sec.) 
     
    168167    } 
    169168 
    170     if ($oldvars !== false) { 
     169    if ($oldvars !== null) { 
    171170      $newvars = $this->_fixvars($vars, $oldvars); 
    172171 
     
    198197  private function _fixvars($vars, $oldvars) 
    199198  { 
    200     if ($oldvars !== false) { 
     199    if ($oldvars !== null) { 
    201200      $a_oldvars = $this->unserialize($oldvars); 
    202201      if (is_array($a_oldvars)) { 
     
    266265      $this->key     = $key; 
    267266 
    268       if (!empty($this->vars)) 
    269         return $this->vars; 
    270     } 
    271  
    272     return false; 
    273   } 
     267      return !empty($this->vars) ? (string) $this->vars : ''; 
     268    } 
     269 
     270    return null; 
     271  } 
     272 
    274273 
    275274  /** 
     
    287286    // no session data in cache (mc_read() returns false) 
    288287    if (!$this->key) 
    289       $oldvars = false; 
     288      $oldvars = null; 
    290289    // use internal data for fast requests (up to 0.5 sec.) 
    291290    else if ($key == $this->key && (!$this->vars || $ts - $this->start < 0.5)) 
     
    294293      $oldvars = $this->mc_read($key); 
    295294 
    296     $newvars = $oldvars !== false ? $this->_fixvars($vars, $oldvars) : $vars; 
    297      
     295    $newvars = $oldvars !== null ? $this->_fixvars($vars, $oldvars) : $vars; 
     296 
    298297    if ($newvars !== $oldvars || $ts - $this->changed > $this->lifetime / 2) 
    299298      return $this->memcache->set($key, serialize(array('changed' => time(), 'ip' => $this->ip, 'vars' => $newvars)), MEMCACHE_COMPRESSED, $this->lifetime); 
    300      
    301     return true; 
    302   } 
     299 
     300    return true; 
     301  } 
     302 
    303303 
    304304  /** 
     
    351351    session_regenerate_id($destroy); 
    352352 
    353     $this->vars = false; 
     353    $this->vars = null; 
    354354    $this->key  = session_id(); 
    355355 
     
    374374    return true; 
    375375  } 
    376    
     376 
     377 
    377378  /** 
    378379   * Kill this session 
     
    380381  public function kill() 
    381382  { 
    382     $this->vars = false; 
     383    $this->vars = null; 
    383384    $this->ip = $_SERVER['REMOTE_ADDR']; // update IP (might have changed) 
    384385    $this->destroy(session_id()); 
Note: See TracChangeset for help on using the changeset viewer.