NETLINK
2012-11-09 7978f872cbd154b169fc9395a3103031f056cf29
Update plugins/password/password.php

Add logic for checking supported IMAP hosts

Make use of additional config option
'password_supported_hosts' (see config.inc.php.dist).
If current IMAP host is not in array of defined
hosts, exit and suppress Password option in Settings.
1 files modified
6 ■■■■■ changed files
plugins/password/password.php 6 ●●●●● patch | view | raw | blame | history
plugins/password/password.php
@@ -55,6 +55,12 @@
        $rcmail = rcmail::get_instance();
        $this->load_config();
        $host = isset( $_SESSION['imap_host'] ) ? $_SESSION['imap_host'] : NULL;
        $hosts = $rcmail->config->get( 'password_supported_hosts' );
        if ( !empty( $hosts ) and !in_array( $host, $hosts ) {
            return;
        }
        // Exceptions list
        if ($exceptions = $rcmail->config->get('password_login_exceptions')) {