/[soft]/identity/CatDap/trunk/lib/CatDap/Controller/admin.pm
ViewVC logotype

Diff of /identity/CatDap/trunk/lib/CatDap/Controller/admin.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 101 by misc, Thu Nov 4 20:08:28 2010 UTC revision 170 by misc, Thu Dec 16 00:34:17 2010 UTC
# Line 47  sub auto : Private { Line 47  sub auto : Private {
47      my $password;      my $password;
48      my $mesg;      my $mesg;
49      my $dn;      my $dn;
50      my $keyprefix = sprintf( "%02x%02x%02x", split /\./, $c->req->address );      my $keyprefix;
51        if ($c->req->address =~ m/:/) {
52            my $address = $c->req->address;
53            $address =~ s/\[\]://;
54            $keyprefix = sprintf( "%06x", $address >> 104 ); # if we shift right 104 bits from 128 we have 24 bits left or 3 bytes.
55        }
56        else {
57            $keyprefix = sprintf( "%02x%02x%02x", split /\./, $c->req->address );
58        }
59      if ( !defined $c->user or not $c->req->cookie('key') ) {      if ( !defined $c->user or not $c->req->cookie('key') ) {
60          $c->detach('/user/login')          $c->detach('/user/login')
61            if ( not $c->req->param('username')            if ( not $c->req->param('username')

Legend:
Removed from v.101  
changed lines
  Added in v.170

  ViewVC Help
Powered by ViewVC 1.1.30