vulnerability bugs version 6

The PR fixes a number of bugs outlined in the GEM Vulnerability Database & GUI Google doc.
is_set() function declaration appear in 4 different files, please move it in a common js file and fix it because is wrong.
The correct version is:
```
function is_set(a) {
    return (typeof(a) != 'undefined' && a !== "" && a !== null);
    }
```