[zarafa/f21] Added minor bugfixes to two patches
Robert Scheck
robert at fedoraproject.org
Sun Feb 22 23:58:28 UTC 2015
commit 860fae12508e25d020d8ee3e3762d34475280606
Author: Robert Scheck <robert at fedoraproject.org>
Date: Mon Feb 23 00:58:12 2015 +0100
Added minor bugfixes to two patches
zarafa-7.1.10-webaccess-fail2ban.patch | 38 ----------------------
zarafa-7.1.11-webaccess-fail2ban.patch | 21 ++++++++++++
...t.patch => zarafa-7.1.11-webaccess-mcrypt.patch | 6 ++--
3 files changed, 24 insertions(+), 41 deletions(-)
---
diff --git a/zarafa-7.1.11-webaccess-fail2ban.patch b/zarafa-7.1.11-webaccess-fail2ban.patch
new file mode 100644
index 0000000..3c2b5c3
--- /dev/null
+++ b/zarafa-7.1.11-webaccess-fail2ban.patch
@@ -0,0 +1,21 @@
+Patch by Robert Scheck <robert at fedoraproject.org> for Zarafa <= 7.1.11 which logs authentication
+failures of Zarafa WebAccess into the error log of the webserver. This is basically a backport of
+https://jira.zarafa.com/browse/WA-6908 from WebApp to WebAccess. In difference to original patch
+there is no inappropriate space before a punctuation mark also known as "plenken".
+
+Proposed to upstream via e-mail on Wed, 13 Aug 2014 22:56:09 +0200, initial patch was put into the
+upstream ticket https://jira.zarafa.com/browse/ZCP-12543.
+
+--- zarafa-7.1.11/php-webclient-ajax/client/login.php 2014-09-03 10:45:06.000000000 +0200
++++ zarafa-7.1.11/php-webclient-ajax/client/login.php 2015-02-18 01:08:13.000000000 +0100
+@@ -86,6 +86,10 @@
+ switch($_SESSION["hresult"]){
+ case MAPI_E_LOGON_FAILED:
+ case MAPI_E_UNCONFIGURED:
++ // Print error message to error_log of webserver
++ if (!empty($_POST["username"])) {
++ error_log('user '.$_POST["username"].': authentication failure at MAPI');
++ }
+ echo _("Logon failed, please check your name/password.");
+ break;
+ case MAPI_E_NETWORK_ERROR:
diff --git a/zarafa-7.1.10-webaccess-mcrypt.patch b/zarafa-7.1.11-webaccess-mcrypt.patch
similarity index 93%
rename from zarafa-7.1.10-webaccess-mcrypt.patch
rename to zarafa-7.1.11-webaccess-mcrypt.patch
index 49bed4e..56b5274 100644
--- a/zarafa-7.1.10-webaccess-mcrypt.patch
+++ b/zarafa-7.1.11-webaccess-mcrypt.patch
@@ -22,8 +22,8 @@ Requires: php-openssl
This requires php-openssl (provided by php-common) on RHEL 6 (and later) and php-mcrypt (separate package) before RHEL 6.
-Proposed to upstream via e-mail on Thu, 5 Jun 2014 00:24:32 +0200, patch was put into the (non-disclosed) upstream ticket
-https://jira.zarafa.com/browse/ZCP-12407.
+Proposed to upstream via e-mail on Thu, 5 Jun 2014 00:24:32 +0200, initial patch was put into the (non-disclosed) upstream
+ticket https://jira.zarafa.com/browse/ZCP-12407.
--- zarafa-7.1.10/php-webclient-ajax/index.php 2014-05-23 15:56:38.000000000 +0200
+++ zarafa-7.1.10/php-webclient-ajax/index.php.webaccess-mcrypt 2014-06-05 00:08:18.000000000 +0200
@@ -43,7 +43,7 @@ https://jira.zarafa.com/browse/ZCP-12407.
if(function_exists("openssl_decrypt")) {
$password = openssl_decrypt($password,"des-ede3-cbc",PASSWORD_KEY,0,PASSWORD_IV);
+ } elseif(function_exists("mcrypt_decrypt")) {
-+ $password = trim(mcrypt_decrypt(MCRYPT_TRIPLEDES, PASSWORD_KEY, base64_decode($password), MCRYPT_MODE_CBC, PASSWORD_IV));
++ $password = rtrim(mcrypt_decrypt(MCRYPT_TRIPLEDES, PASSWORD_KEY, base64_decode($password), MCRYPT_MODE_CBC, PASSWORD_IV), "\0");
}
// logon
$this->session = mapi_logon_zarafa($username, $password, $server, $sslcert_file, $sslcert_pass);
More information about the scm-commits
mailing list