packages: horde/horde.spec, horde/horde-crypt-detect.patch (NEW) - rel 2 - ...
baggins
baggins at pld-linux.org
Thu Sep 9 12:41:27 CEST 2010
Author: baggins Date: Thu Sep 9 10:41:27 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- rel 2
- detect crypt type and set salt accordingly
- properly set salt for crypt-blowfish
---- Files affected:
packages/horde:
horde.spec (1.182 -> 1.183) , horde-crypt-detect.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: packages/horde/horde.spec
diff -u packages/horde/horde.spec:1.182 packages/horde/horde.spec:1.183
--- packages/horde/horde.spec:1.182 Tue Sep 7 14:43:58 2010
+++ packages/horde/horde.spec Thu Sep 9 12:41:22 2010
@@ -17,7 +17,7 @@
Summary(pt_BR.UTF-8): Componentes comuns do Horde usados por todos os módulos
Name: %{hordeapp}
Version: 3.3.8
-Release: 1
+Release: 2
License: LGPL
Group: Applications/WWW
Source0: ftp://ftp.horde.org/pub/horde/%{hordeapp}-%{version}.tar.gz
@@ -31,6 +31,7 @@
Patch5: %{name}-mime_drivers.patch
Patch6: %{name}-webroot.patch
Patch7: %{name}-geoip.patch
+Patch8: %{name}-crypt-detect.patch
URL: http://www.horde.org/
BuildRequires: rpm-php-pearprov >= 4.0.2-98
BuildRequires: rpmbuild(macros) >= 1.304
@@ -167,6 +168,7 @@
%patch5 -p1
%patch6 -p1
%patch7 -p1
+%patch8 -p1
rm -f {,*/}.htaccess
for i in config/*.dist; do
@@ -344,6 +346,11 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.183 2010/09/09 10:41:22 baggins
+- rel 2
+- detect crypt type and set salt accordingly
+- properly set salt for crypt-blowfish
+
Revision 1.182 2010/09/07 12:43:58 glen
- 3.3.8
================================================================
Index: packages/horde/horde-crypt-detect.patch
diff -u /dev/null packages/horde/horde-crypt-detect.patch:1.1
--- /dev/null Thu Sep 9 12:41:27 2010
+++ packages/horde/horde-crypt-detect.patch Thu Sep 9 12:41:22 2010
@@ -0,0 +1,35 @@
+diff -ur horde-3.3.8/lib/Horde/Auth.php horde-3.3.8-crypt/lib/Horde/Auth.php
+--- horde-3.3.8/lib/Horde/Auth.php 2010-04-28 15:39:32.000000000 +0200
++++ horde-3.3.8-crypt/lib/Horde/Auth.php 2010-09-09 12:38:49.569091001 +0200
+@@ -299,6 +299,19 @@ function getSalt($encryption = 'md5-hex', $seed = '', $plaintext = '')
+ {
+ switch ($encryption) {
+ case 'crypt':
++ if ($seed) {
++ $enctmp = explode('$', $seed);
++ if ($enctmp[1] == 1) {
++ return substr(preg_replace('|^{crypt}|i', '', $seed), 0, 12);
++ } elseif ($enctmp[1] == 2) {
++ return substr(preg_replace('|^{crypt}|i', '', $seed), 0, 30);
++ } else {
++ return substr(preg_replace('|^{crypt}|i', '', $seed), 0, 2);
++ }
++ } else {
++ return substr(md5(mt_rand()), 0, 2);
++ }
++
+ case 'crypt-des':
+ if ($seed) {
+ return substr(preg_replace('|^{crypt}|i', '', $seed), 0, 2);
+@@ -316,9 +329,9 @@
+
+ case 'crypt-blowfish':
+ if ($seed) {
+- return substr(preg_replace('|^{crypt}|i', '', $seed), 0, 16);
++ return substr(preg_replace('|^{crypt}|i', '', $seed), 0, 30);
+ } else {
+- return '$2$' . substr(md5(mt_rand()), 0, 12) . '$';
++ return '$2a$08$' . substr(md5(mt_rand()), 0, 23);
+ }
+
+ case 'ssha':
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/horde/horde.spec?r1=1.182&r2=1.183&f=u
More information about the pld-cvs-commit
mailing list