aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/CatDap/Controller/user.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CatDap/Controller/user.pm b/lib/CatDap/Controller/user.pm
index 8c14cfd..6f8ac9f 100644
--- a/lib/CatDap/Controller/user.pm
+++ b/lib/CatDap/Controller/user.pm
@@ -118,7 +118,8 @@ sub get_keyprefix : Private {
if ($c->req->address =~ m/:/) {
# For IPv6 the first 3 can be special and shared by many people,
# bytes 6-8 are more interesting
- $keyprefix = sprintf( "%02x%02x%02x", splice(5, 3, split /:/, $c->req->address));
+ my @address_chunks = split /:/, $c->req->address;
+ $keyprefix = sprintf( "%02x%02x%02x", splice(@address_chunks, 5, 3));
}
else {
$keyprefix = sprintf( "%02x%02x%02x", split /\./, $c->req->address );