From 1be510f9529cb082f802408b472a77d074b394c0 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Sun, 14 Apr 2013 13:46:12 +0000 Subject: Add zarb MLs html archives --- zarb-ml/mageia-sysadm/2010-November/000908.html | 142 ++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 zarb-ml/mageia-sysadm/2010-November/000908.html (limited to 'zarb-ml/mageia-sysadm/2010-November/000908.html') diff --git a/zarb-ml/mageia-sysadm/2010-November/000908.html b/zarb-ml/mageia-sysadm/2010-November/000908.html new file mode 100644 index 000000000..7a8668c1c --- /dev/null +++ b/zarb-ml/mageia-sysadm/2010-November/000908.html @@ -0,0 +1,142 @@ + + + + [Mageia-sysadm] [135] - factorise the code who deal with ip ( so we can change it at one place for ipv6 support ) + + + + + + + + + +

[Mageia-sysadm] [135] - factorise the code who deal with ip ( so we can change it at one place for ipv6 support )

+ root at mageia.org + root at mageia.org +
+ Thu Nov 25 00:03:07 CET 2010 +

+
+ +
Revision: 135
+Author:   misc
+Date:     2010-11-25 00:03:07 +0100 (Thu, 25 Nov 2010)
+Log Message:
+-----------
+- factorise the code who deal with ip ( so we can change it at one place for ipv6 support )
+
+Modified Paths:
+--------------
+    identity/CatDap/trunk/lib/CatDap/Controller/user.pm
+
+Modified: identity/CatDap/trunk/lib/CatDap/Controller/user.pm
+===================================================================
+--- identity/CatDap/trunk/lib/CatDap/Controller/user.pm	2010-11-24 19:26:09 UTC (rev 134)
++++ identity/CatDap/trunk/lib/CatDap/Controller/user.pm	2010-11-24 23:03:07 UTC (rev 135)
+@@ -55,7 +55,7 @@
+     my $mesg;
+     my $dn;
+     my @errors;
+-    my $keyprefix = sprintf("%02x%02x%02x",split /\./,$c->req->address);
++    my $keyprefix = $self->get_keyprefix($c);
+     if (! defined $c->user or not $c->req->cookie('key')) {
+ 	if (not $c->req->param('password')) {
+ 	    push @errors,$c->loc('Your session has expired');
+@@ -112,6 +112,10 @@
+ 
+ }
+ 
++sub get_keyprefix : Private {
++    my ( $self, $c ) = @_;
++    return sprintf("%02x%02x%02x",split /\./,$c->req->address);
++}
+ =head2 index
+ 
+ =cut
+@@ -286,7 +290,7 @@
+     } else {
+ 
+         # re-encrypt the new password and forward to user view
+-        my $keyprefix = sprintf("%02x%02x%02x",split /\./,$c->req->address);
++        my $keyprefix = $self->get_keyprefix($c);
+         my $key = $c->req->cookie('key')->value;
+         $cipher = Crypt::CBC->new( -key    => $keyprefix . $key,
+             -cipher => 'Blowfish'
+@@ -314,7 +318,7 @@
+             $c->res->redirect('/user');
+ 	}
+ 	# cache password for next request with form data
+-        my $keyprefix = sprintf("%02x%02x%02x",split /\./,$c->req->address);
++        my $keyprefix = $self->get_keyprefix($c);
+ 	my $key = Data::UUID->new->create_str();
+         $cipher = Crypt::CBC->new( -key    => $keyprefix . $key,
+                 -cipher => 'Blowfish'
+@@ -331,7 +335,7 @@
+     }
+ 
+     #Re-authenticate user
+-    my $keyprefix = sprintf("%02x%02x%02x",split /\./,$c->req->address);
++    my $keyprefix = $self->get_keyprefix($c);
+     my $key = $c->req->cookie('key')->value;
+     $cipher = Crypt::CBC->new( -key    => $keyprefix . $key,
+         -cipher => 'Blowfish'
+-------------- next part --------------
+An HTML attachment was scrubbed...
+URL: </pipermail/mageia-sysadm/attachments/20101125/fa7a0339/attachment.html>
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+

+ +
+More information about the Mageia-sysadm +mailing list
+ -- cgit v1.2.1