Fix various PHP code bugs found using static analysis (#1489086)
| | |
| | | CHANGELOG Roundcube Webmail |
| | | =========================== |
| | | |
| | | - Fix various PHP code bugs found using static analysis (#1489086) |
| | | - Fix backslash character handling on vCard import (#1489085) |
| | | - Fix csv import from Thunderbird with French localization (#1489059) |
| | | - Fix messages list focus issue in Opera and Webkit (#1489058) |
| | |
| | | $rcmail = rcmail::get_instance(); |
| | | $this->rc = $rcmail; |
| | | |
| | | $section = rcube_utils::get_input_value('_section', rcube_utils::INPUT_GET); |
| | | |
| | | if ($this->rc->task == 'mail') { |
| | | // message parse/display hooks |
| | | $this->add_hook('message_part_structure', array($this, 'parse_structure')); |
| | |
| | | $this->register_action('plugin.enigma', array($this, 'preferences_ui')); |
| | | |
| | | // grab keys/certs management iframe requests |
| | | $section = rcube_utils::get_input_value('_section', rcube_utils::INPUT_GET); |
| | | if ($this->rc->action == 'edit-prefs' && preg_match('/^enigma(certs|keys)/', $section)) { |
| | | $this->load_ui(); |
| | | $this->ui->init($section); |
| | |
| | | { |
| | | // @TODO: Handle big bodies using (temp) files |
| | | // @TODO: caching of verification result |
| | | |
| | | $sig = $this->pgp_driver->verify($msg_body, $sig_body); |
| | | |
| | | if (($sig instanceof enigma_error) && $sig->getCode() != enigma_error::E_KEYNOTFOUND) |
| | | rcube::raise_error(array( |
| | | 'code' => 600, 'type' => 'php', |
| | | 'file' => __FILE__, 'line' => __LINE__, |
| | | 'message' => "Enigma plugin: " . $error->getMessage() |
| | | 'message' => "Enigma plugin: " . $sig->getMessage() |
| | | ), true, false); |
| | | |
| | | //print_r($sig); |
| | | return $sig; |
| | | } |
| | | |
| | |
| | | { |
| | | // @TODO: Handle big bodies using (temp) files |
| | | // @TODO: caching of verification result |
| | | |
| | | $key = ''; $pass = ''; // @TODO |
| | | $result = $this->pgp_driver->decrypt($msg_body, $key, $pass); |
| | | |
| | | //print_r($result); |
| | | |
| | | if ($result instanceof enigma_error) { |
| | | $err_code = $result->getCode(); |
| | |
| | | function save($currpass, $newpass) |
| | | { |
| | | $user = $_SESSION['username']; |
| | | $error = ''; |
| | | |
| | | if (extension_loaded('pam') || extension_loaded('pam_auth')) { |
| | | if (pam_auth($user, $currpass, $error, false)) { |
| | |
| | | $dsn_string = $this->dsn_string($dsn); |
| | | $dsn_options = $this->dsn_options($dsn); |
| | | |
| | | if ($db_pconn) { |
| | | if ($this->db_pconn) { |
| | | $dsn_options[PDO::ATTR_PERSISTENT] = true; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | // try to connect to server and exit on failure |
| | | $result = $this->conn->connect($smtp_timeout); |
| | | $result = $this->conn->connect($CONFIG['smtp_timeout']); |
| | | |
| | | if (PEAR::isError($result)) { |
| | | $this->response[] = "Connection failed: ".$result->getMessage(); |