summaryrefslogtreecommitdiff
path: root/plugins/password
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/password')
-rw-r--r--plugins/password/drivers/chpasswd.php2
-rw-r--r--plugins/password/drivers/dbmail.php2
-rw-r--r--plugins/password/drivers/directadmin.php2
-rw-r--r--plugins/password/drivers/expect.php2
-rw-r--r--plugins/password/drivers/hmail.php12
-rw-r--r--plugins/password/drivers/ldap.php2
-rw-r--r--plugins/password/drivers/ldap_simple.php2
-rw-r--r--plugins/password/drivers/pam.php4
-rw-r--r--plugins/password/drivers/pw_usermod.php2
-rw-r--r--plugins/password/drivers/sasl.php2
-rw-r--r--plugins/password/drivers/smb.php2
-rw-r--r--plugins/password/drivers/sql.php14
-rw-r--r--plugins/password/drivers/virtualmin.php2
-rw-r--r--plugins/password/drivers/xmail.php4
-rw-r--r--plugins/password/password.php32
15 files changed, 43 insertions, 43 deletions
diff --git a/plugins/password/drivers/chpasswd.php b/plugins/password/drivers/chpasswd.php
index 3ea10159c..137275e69 100644
--- a/plugins/password/drivers/chpasswd.php
+++ b/plugins/password/drivers/chpasswd.php
@@ -26,7 +26,7 @@ class rcube_chpasswd_password
return PASSWORD_SUCCESS;
}
else {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/dbmail.php b/plugins/password/drivers/dbmail.php
index e4c0d52e3..529027b8d 100644
--- a/plugins/password/drivers/dbmail.php
+++ b/plugins/password/drivers/dbmail.php
@@ -29,7 +29,7 @@ class rcube_dbmail_password
return PASSWORD_SUCCESS;
}
else {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/directadmin.php b/plugins/password/drivers/directadmin.php
index fb156cea9..8bf0dc613 100644
--- a/plugins/password/drivers/directadmin.php
+++ b/plugins/password/drivers/directadmin.php
@@ -43,7 +43,7 @@ class rcube_directadmin_password
$response = $Socket->fetch_parsed_body();
//DEBUG
- //console("Password Plugin: [USER: $da_user] [HOST: $da_host] - Response: [SOCKET: ".$Socket->result_status_code."] [DA ERROR: ".strip_tags($response['error'])."] [TEXT: ".$response[text]."]");
+ //rcube::console("Password Plugin: [USER: $da_user] [HOST: $da_host] - Response: [SOCKET: ".$Socket->result_status_code."] [DA ERROR: ".strip_tags($response['error'])."] [TEXT: ".$response[text]."]");
if($Socket->result_status_code != 200)
return array('code' => PASSWORD_CONNECT_ERROR, 'message' => $Socket->error[0]);
diff --git a/plugins/password/drivers/expect.php b/plugins/password/drivers/expect.php
index 7a191e254..1f68924df 100644
--- a/plugins/password/drivers/expect.php
+++ b/plugins/password/drivers/expect.php
@@ -45,7 +45,7 @@ class rcube_expect_password
return PASSWORD_SUCCESS;
}
else {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/hmail.php b/plugins/password/drivers/hmail.php
index 104c851ae..a8f07a23b 100644
--- a/plugins/password/drivers/hmail.php
+++ b/plugins/password/drivers/hmail.php
@@ -26,8 +26,8 @@ class rcube_hmail_password
$obApp = new COM("hMailServer.Application");
}
catch (Exception $e) {
- write_log('errors', "Plugin password (hmail driver): " . trim(strip_tags($e->getMessage())));
- write_log('errors', "Plugin password (hmail driver): This problem is often caused by DCOM permissions not being set.");
+ rcube::write_log('errors', "Plugin password (hmail driver): " . trim(strip_tags($e->getMessage())));
+ rcube::write_log('errors', "Plugin password (hmail driver): This problem is often caused by DCOM permissions not being set.");
return PASSWORD_ERROR;
}
@@ -39,8 +39,8 @@ class rcube_hmail_password
else {
$domain = $rcmail->config->get('username_domain',false);
if (!$domain) {
- write_log('errors','Plugin password (hmail driver): $rcmail_config[\'username_domain\'] is not defined.');
- write_log('errors','Plugin password (hmail driver): Hint: Use hmail_login plugin (http://myroundcube.googlecode.com');
+ rcube::write_log('errors','Plugin password (hmail driver): $rcmail_config[\'username_domain\'] is not defined.');
+ rcube::write_log('errors','Plugin password (hmail driver): Hint: Use hmail_login plugin (http://myroundcube.googlecode.com');
return PASSWORD_ERROR;
}
$username = $username . "@" . $domain;
@@ -55,8 +55,8 @@ class rcube_hmail_password
return PASSWORD_SUCCESS;
}
catch (Exception $e) {
- write_log('errors', "Plugin password (hmail driver): " . trim(strip_tags($e->getMessage())));
- write_log('errors', "Plugin password (hmail driver): This problem is often caused by DCOM permissions not being set.");
+ rcube::write_log('errors', "Plugin password (hmail driver): " . trim(strip_tags($e->getMessage())));
+ rcube::write_log('errors', "Plugin password (hmail driver): This problem is often caused by DCOM permissions not being set.");
return PASSWORD_ERROR;
}
}
diff --git a/plugins/password/drivers/ldap.php b/plugins/password/drivers/ldap.php
index f773335ac..548d327e1 100644
--- a/plugins/password/drivers/ldap.php
+++ b/plugins/password/drivers/ldap.php
@@ -271,7 +271,7 @@ class rcube_ldap_password
case 'samba':
if (function_exists('hash')) {
- $cryptedPassword = hash('md4', rcube_charset_convert($passwordClear, RCMAIL_CHARSET, 'UTF-16LE'));
+ $cryptedPassword = hash('md4', rcube_charset::convert($passwordClear, RCUBE_CHARSET, 'UTF-16LE'));
$cryptedPassword = strtoupper($cryptedPassword);
} else {
/* Your PHP install does not have the hash() function */
diff --git a/plugins/password/drivers/ldap_simple.php b/plugins/password/drivers/ldap_simple.php
index 01385f2d0..d47e14492 100644
--- a/plugins/password/drivers/ldap_simple.php
+++ b/plugins/password/drivers/ldap_simple.php
@@ -240,7 +240,7 @@ class rcube_ldap_simple_password
break;
case 'samba':
if (function_exists('hash')) {
- $crypted_password = hash('md4', rcube_charset_convert($password_clear, RCMAIL_CHARSET, 'UTF-16LE'));
+ $crypted_password = hash('md4', rcube_charset::convert($password_clear, RCUBE_CHARSET, 'UTF-16LE'));
$crypted_password = strtoupper($crypted_password);
} else {
/* Your PHP install does not have the hash() function */
diff --git a/plugins/password/drivers/pam.php b/plugins/password/drivers/pam.php
index 20524d9f1..8cd94c737 100644
--- a/plugins/password/drivers/pam.php
+++ b/plugins/password/drivers/pam.php
@@ -20,7 +20,7 @@ class rcube_pam_password
}
}
else {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
@@ -29,7 +29,7 @@ class rcube_pam_password
}
}
else {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/pw_usermod.php b/plugins/password/drivers/pw_usermod.php
index 5b92fcbfb..237e275a7 100644
--- a/plugins/password/drivers/pw_usermod.php
+++ b/plugins/password/drivers/pw_usermod.php
@@ -28,7 +28,7 @@ class rcube_pw_usermod_password
return PASSWORD_SUCCESS;
}
else {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/sasl.php b/plugins/password/drivers/sasl.php
index 9380cf838..8776eff2e 100644
--- a/plugins/password/drivers/sasl.php
+++ b/plugins/password/drivers/sasl.php
@@ -32,7 +32,7 @@ class rcube_sasl_password
return PASSWORD_SUCCESS;
}
else {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/smb.php b/plugins/password/drivers/smb.php
index 88021156f..d56924eee 100644
--- a/plugins/password/drivers/smb.php
+++ b/plugins/password/drivers/smb.php
@@ -44,7 +44,7 @@ class rcube_smb_password
return PASSWORD_SUCCESS;
}
else {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/sql.php b/plugins/password/drivers/sql.php
index b08833dbf..e02bff146 100644
--- a/plugins/password/drivers/sql.php
+++ b/plugins/password/drivers/sql.php
@@ -117,7 +117,7 @@ class rcube_sql_password
// hashed passwords
if (preg_match('/%[n|q]/', $sql)) {
if (!extension_loaded('hash')) {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
@@ -164,14 +164,14 @@ class rcube_sql_password
// convert domains to/from punnycode
if ($rcmail->config->get('password_idn_ascii')) {
- $domain_part = rcube_idn_to_ascii($domain_part);
- $username = rcube_idn_to_ascii($username);
- $host = rcube_idn_to_ascii($host);
+ $domain_part = rcube_utils::idn_to_ascii($domain_part);
+ $username = rcube_utils::idn_to_ascii($username);
+ $host = rcube_utils::idn_to_ascii($host);
}
else {
- $domain_part = rcube_idn_to_utf8($domain_part);
- $username = rcube_idn_to_utf8($username);
- $host = rcube_idn_to_utf8($host);
+ $domain_part = rcube_utils::idn_to_utf8($domain_part);
+ $username = rcube_utils::idn_to_utf8($username);
+ $host = rcube_utils::idn_to_utf8($host);
}
// at least we should always have the local part
diff --git a/plugins/password/drivers/virtualmin.php b/plugins/password/drivers/virtualmin.php
index d2b765a9e..2c7aee617 100644
--- a/plugins/password/drivers/virtualmin.php
+++ b/plugins/password/drivers/virtualmin.php
@@ -67,7 +67,7 @@ class rcube_virtualmin_password
return PASSWORD_SUCCESS;
}
else {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/drivers/xmail.php b/plugins/password/drivers/xmail.php
index 33a49ffe3..37abc3001 100644
--- a/plugins/password/drivers/xmail.php
+++ b/plugins/password/drivers/xmail.php
@@ -32,7 +32,7 @@ class rcube_xmail_password
$xmail->port = $rcmail->config->get('xmail_port');
if (!$xmail->connect()) {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
@@ -42,7 +42,7 @@ class rcube_xmail_password
}
else if (!$xmail->send("userpasswd\t".$domain."\t".$user."\t".$newpass."\n")) {
$xmail->close();
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
diff --git a/plugins/password/password.php b/plugins/password/password.php
index 806db0586..39020a0bf 100644
--- a/plugins/password/password.php
+++ b/plugins/password/password.php
@@ -112,22 +112,22 @@ class password extends rcube_plugin
$rc_charset = strtoupper($rcmail->output->get_charset());
$sespwd = $rcmail->decrypt($_SESSION['password']);
- $curpwd = $confirm ? get_input_value('_curpasswd', RCUBE_INPUT_POST, true, $charset) : $sespwd;
- $newpwd = get_input_value('_newpasswd', RCUBE_INPUT_POST, true);
- $conpwd = get_input_value('_confpasswd', RCUBE_INPUT_POST, true);
+ $curpwd = $confirm ? rcube_utils::get_input_value('_curpasswd', rcube_utils::INPUT_POST, true, $charset) : $sespwd;
+ $newpwd = rcube_utils::get_input_value('_newpasswd', rcube_utils::INPUT_POST, true);
+ $conpwd = rcube_utils::get_input_value('_confpasswd', rcube_utils::INPUT_POST, true);
// check allowed characters according to the configured 'password_charset' option
// by converting the password entered by the user to this charset and back to UTF-8
$orig_pwd = $newpwd;
- $chk_pwd = rcube_charset_convert($orig_pwd, $rc_charset, $charset);
- $chk_pwd = rcube_charset_convert($chk_pwd, $charset, $rc_charset);
+ $chk_pwd = rcube_charset::convert($orig_pwd, $rc_charset, $charset);
+ $chk_pwd = rcube_charset::convert($chk_pwd, $charset, $rc_charset);
// WARNING: Default password_charset is ISO-8859-1, so conversion will
// change national characters. This may disable possibility of using
// the same password in other MUA's.
// We're doing this for consistence with Roundcube core
- $newpwd = rcube_charset_convert($newpwd, $rc_charset, $charset);
- $conpwd = rcube_charset_convert($conpwd, $rc_charset, $charset);
+ $newpwd = rcube_charset::convert($newpwd, $rc_charset, $charset);
+ $conpwd = rcube_charset::convert($conpwd, $rc_charset, $charset);
if ($chk_pwd != $orig_pwd) {
$rcmail->output->command('display_message', $this->gettext('passwordforbidden'), 'error');
@@ -141,7 +141,7 @@ class password extends rcube_plugin
}
else if ($required_length && strlen($newpwd) < $required_length) {
$rcmail->output->command('display_message', $this->gettext(
- array('name' => 'passwordshort', 'vars' => array('length' => $required_length))), 'error');
+ array('name' => 'passwordshort', 'vars' => array('length' => $required_length))), 'error');
}
else if ($check_strength && (!preg_match("/[0-9]/", $newpwd) || !preg_match("/[^A-Za-z0-9]/", $newpwd))) {
$rcmail->output->command('display_message', $this->gettext('passwordweak'), 'error');
@@ -163,8 +163,8 @@ class password extends rcube_plugin
// Log password change
if ($rcmail->config->get('password_log')) {
- write_log('password', sprintf('Password changed for user %s (ID: %d) from %s',
- $rcmail->get_user_name(), $rcmail->user->ID, rcmail_remote_ip()));
+ rcube::write_log('password', sprintf('Password changed for user %s (ID: %d) from %s',
+ $rcmail->get_user_name(), $rcmail->user->ID, rcube_utils::remote_ip()));
}
}
else {
@@ -172,7 +172,7 @@ class password extends rcube_plugin
}
}
- rcmail_overwrite_action('plugin.password');
+ $rcmail->overwrite_action('plugin.password');
$rcmail->output->send('plugin');
}
@@ -197,7 +197,7 @@ class password extends rcube_plugin
$input_curpasswd = new html_passwordfield(array('name' => '_curpasswd', 'id' => $field_id,
'size' => 20, 'autocomplete' => 'off'));
- $table->add('title', html::label($field_id, Q($this->gettext('curpasswd'))));
+ $table->add('title', html::label($field_id, rcube::Q($this->gettext('curpasswd'))));
$table->add(null, $input_curpasswd->show());
}
@@ -206,7 +206,7 @@ class password extends rcube_plugin
$input_newpasswd = new html_passwordfield(array('name' => '_newpasswd', 'id' => $field_id,
'size' => 20, 'autocomplete' => 'off'));
- $table->add('title', html::label($field_id, Q($this->gettext('newpasswd'))));
+ $table->add('title', html::label($field_id, rcube::Q($this->gettext('newpasswd'))));
$table->add(null, $input_newpasswd->show());
// show confirm password selection
@@ -214,7 +214,7 @@ class password extends rcube_plugin
$input_confpasswd = new html_passwordfield(array('name' => '_confpasswd', 'id' => $field_id,
'size' => 20, 'autocomplete' => 'off'));
- $table->add('title', html::label($field_id, Q($this->gettext('confpasswd'))));
+ $table->add('title', html::label($field_id, rcube::Q($this->gettext('confpasswd'))));
$table->add(null, $input_confpasswd->show());
$out = html::div(array('class' => 'box'),
@@ -246,7 +246,7 @@ class password extends rcube_plugin
$file = $this->home . "/drivers/$driver.php";
if (!file_exists($file)) {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
@@ -258,7 +258,7 @@ class password extends rcube_plugin
include_once $file;
if (!class_exists($class, false) || !method_exists($class, 'save')) {
- raise_error(array(
+ rcube::raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,