Commit 813926e9 authored by Christophe Maudoux's avatar Christophe Maudoux 🐛

Delete empty _2fDevices session key

parent ed4b7413
......@@ -207,8 +207,7 @@ llapp.controller 'SessionsExplorerCtrl', ['$scope', '$translator', '$location',
# 2. Push session keys in result, grouped by categories
for category, attrs of categories
subres = []
for attr in attrs
for attr in attrs
if session[attr] and session[attr].match(/\w+/)
if session[attr].match(/"type":\s*"(?:TOTP|U2F|UBK)"/)
subres.push
......@@ -235,6 +234,8 @@ llapp.controller 'SessionsExplorerCtrl', ['$scope', '$translator', '$location',
value: session[attr]
epoch: ''
delete session[attr]
else
delete session[attr]
if subres.length >0
res.push
title: "__#{category}__"
......
// Generated by CoffeeScript 1.9.3
// Generated by CoffeeScript 1.10.0
/*
* Session explorer
......@@ -277,6 +277,8 @@
});
delete session[attr];
}
} else {
delete session[attr];
}
}
if (subres.length > 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment