not-node 6.0.5 → 6.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "not-node",
3
- "version": "6.0.5",
3
+ "version": "6.0.7",
4
4
  "description": "node complimentary part for client side notFramework.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -33,7 +33,7 @@
33
33
  "url": "https://github.com/interrupter/not-node/issues"
34
34
  },
35
35
  "dependencies": {
36
- "body-parser": "^1.20.0",
36
+ "body-parser": "^1.20.1",
37
37
  "compression": "^1.7.4",
38
38
  "connect-mongodb-session": "^3.1.1",
39
39
  "connect-redis": "^6.1.3",
@@ -42,12 +42,12 @@
42
42
  "deepmerge": "^4.2.2",
43
43
  "ejs": "^3.1.8",
44
44
  "escape-string-regexp": "*",
45
- "express": "^4.18.1",
45
+ "express": "^4.18.2",
46
46
  "express-fileupload": "^1.4.0",
47
47
  "express-session": "^1.17.3",
48
48
  "fs-extra": "*",
49
- "helmet": "^6.0.0",
50
- "jsonwebtoken": "^8.5.1",
49
+ "helmet": "^6.0.1",
50
+ "jsonwebtoken": "^9.0.0",
51
51
  "lower-case": "*",
52
52
  "method-override": "^3.0.0",
53
53
  "mock-require": "^3.0.3",
@@ -63,8 +63,8 @@
63
63
  "not-monitor": "^0.0.13",
64
64
  "not-path": "^1.0.4",
65
65
  "not-validation": "^0.0.8",
66
- "rate-limiter-flexible": "^2.3.9",
67
- "redis": "^4.3.1",
66
+ "rate-limiter-flexible": "^2.4.1",
67
+ "redis": "^4.5.1",
68
68
  "redlock": "^5.0.0-beta.2",
69
69
  "rfdc": "^1.3.0",
70
70
  "rmdir": "^1.2.0",
@@ -77,18 +77,18 @@
77
77
  "babel-eslint": "^10.1.0",
78
78
  "chai": "*",
79
79
  "chai-as-promised": "*",
80
- "eslint": "^8.23.0",
80
+ "eslint": "^8.30.0",
81
81
  "eslint-plugin-node": "^11.1.0",
82
- "eslint-plugin-sonarjs": "^0.15.0",
82
+ "eslint-plugin-sonarjs": "^0.17.0",
83
83
  "ink-docstrap": "^1.3.2",
84
- "ioredis": "^5.2.3",
85
- "jsdoc": "^3.6.11",
84
+ "ioredis": "^5.2.4",
85
+ "jsdoc": "^4.0.0",
86
86
  "mocha": "*",
87
87
  "mocha-suppress-logs": "^0.3.1",
88
- "mongodb-memory-server": "^8.9.1",
88
+ "mongodb-memory-server": "^8.10.2",
89
89
  "npm-run-all": "^4.1.5",
90
90
  "nyc": "^15.1.0",
91
- "retire": "^3.0.7"
91
+ "retire": "^3.2.1"
92
92
  },
93
93
  "homepage": "https://github.com/interrupter/not-node#readme",
94
94
  "nyc": {
package/src/form/form.js CHANGED
@@ -294,14 +294,14 @@ class Form {
294
294
  if (Array.isArray(instruction)) {
295
295
  this.#extractByInstructionPipe({
296
296
  results,
297
- instruction,
297
+ instructions: instruction,
298
298
  fieldName,
299
299
  req,
300
300
  });
301
301
  } else {
302
302
  this.#extractByInstruction({
303
303
  results,
304
- instructions: instruction,
304
+ instruction,
305
305
  fieldName,
306
306
  req,
307
307
  });
@@ -33,9 +33,14 @@ module.exports = class IdentityProviderSession {
33
33
  **/
34
34
  getRole() {
35
35
  const req = this.req;
36
- return req && req.session && req.session.role
37
- ? req.session.role
38
- : undefined;
36
+ if (req && req.session) {
37
+ if (!req.session.role) {
38
+ this.setGuest();
39
+ }
40
+ return req.session.role;
41
+ } else {
42
+ return undefined;
43
+ }
39
44
  }
40
45
 
41
46
  /**