Skip to content

Commit fe2a903

Browse files
committed
Fixup check_marray
1 parent 26830db commit fe2a903

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

user-auth.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ var check_marray = function(array, string){
1010
// check for the presence of an element of `array`
1111
// inside `string` and return true
1212
var upperString = string.toUpperCase()
13-
for (elem in array) {
14-
if (upperString.indexOf(elem.toUpperCase()) == -1) {
15-
debug("Found " + elem + " in response")
13+
for (var idx in array) {
14+
if (upperString.indexOf(array[idx].toUpperCase()) != -1) {
15+
debug("Found " + array[idx] + " in response")
1616
return true
1717
}
1818
}
@@ -65,7 +65,6 @@ module.exports = {
6565
// we assume that the login was succesfull, this is prone to false-positive
6666
resolve({username: username, permissions: "*"});
6767
}
68-
6968
}
7069
});
7170
} else {

0 commit comments

Comments
 (0)