Skip to content

Commit

Permalink
updated bar, regenerated package-lock; base update (rollbar upgrade)
Browse files Browse the repository at this point in the history
  • Loading branch information
suculent committed Nov 24, 2022
1 parent c6be872 commit 8f89339
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 76 deletions.
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ builder.thinx.json
lcov.info
test-private.sh

#**/package_lock.json
#package_lock.json

deploy-hook.log
deploy.out
mosquitto.lo*
Expand Down Expand Up @@ -68,9 +65,6 @@ conf/github-oauth.json
# Codacy
.profile

# Circle CI
#./package-lock.json

# Mosquitto
mosquitto.aclfile
mqtt_passwords
Expand Down
2 changes: 1 addition & 1 deletion base
Submodule base updated 2 files
+1 −1 package-lock.json
+1 −1 package.json
6 changes: 3 additions & 3 deletions lib/router.auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ module.exports = function (app) {
Util.failureResponse(res, 403, "unauthorized");
} else {

var wrapper = JSON.parse(userWrapper);
let wrapper = JSON.parse(userWrapper);

let owner_id;

if (Util.isDefined(wrapper)) {
if ((Util.isDefined(wrapper)) || (userWrapper == null)) {
owner_id = wrapper.owner;
} else {
auditLogError(userWrapper.owner, "wrapper_error");
auditLogError(owner_id, "wrapper_error");
return Util.failureResponse(res, 403, "wrapper error");
}

Expand Down
9 changes: 2 additions & 7 deletions lib/router.google.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module.exports = function (app) {
console.log("[google] Creating new user...");

// No e-mail to validate.
var will_require_activation = true;
let will_require_activation = true;
if (typeof (odata.email) === "undefined") {
will_require_activation = false;
}
Expand All @@ -62,12 +62,7 @@ module.exports = function (app) {
alog.log(req.session.owner, "OAuth User created: " + userWrapper.given_name + " " + userWrapper.family_name);

// This is weird. Token should be random and with prefix.
var gtoken = sha256(access_token); // "g:"+
redis_client.set(gtoken, JSON.stringify(userWrapper));
redis_client.expire(gtoken, 300);
alog.log(req.session.owner, " OAuth2 User logged in...");

var token = sha256(access_token); // "o:"+
const token = sha256(access_token); // "o:"+
redis_client.set(token, JSON.stringify(userWrapper));
redis_client.expire(token, 3600);

Expand Down
120 changes: 62 additions & 58 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"querystring": "^0.2.0",
"redis": "^3.1.2",
"request": "^2.88.2",
"rollbar": "^2.25.0",
"rollbar": "^2.25.2",
"semver": "7.3.7",
"sha256": "^0.2.0",
"shell-escape": "^0.2.0",
Expand Down

0 comments on commit 8f89339

Please sign in to comment.