@tiledesk/tiledesk-server 2.7.4 → 2.7.6
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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/routes/auth.js +7 -1
package/CHANGELOG.md
CHANGED
@@ -5,6 +5,12 @@
|
|
5
5
|
🚀 IN PRODUCTION 🚀
|
6
6
|
(https://www.npmjs.com/package/@tiledesk/tiledesk-server/v/2.3.77)
|
7
7
|
|
8
|
+
# 2.7.6
|
9
|
+
- Fix auth with admin token
|
10
|
+
|
11
|
+
# 2.7.5
|
12
|
+
- Added support for bot PRIVATE and PUB ket in auth.js
|
13
|
+
|
8
14
|
# 2.7.4
|
9
15
|
- Bug fix '\start' in rulesTrigger
|
10
16
|
- SSO fix
|
package/package.json
CHANGED
package/routes/auth.js
CHANGED
@@ -33,6 +33,12 @@ if (pKey) {
|
|
33
33
|
configSecret = pKey.replace(/\\n/g, '\n');
|
34
34
|
}
|
35
35
|
|
36
|
+
let pubConfigSecret = process.env.GLOBAL_SECRET || config.secret;
|
37
|
+
var pubKey = process.env.GLOBAL_SECRET_OR_PUB_KEY;
|
38
|
+
if (pubKey) {
|
39
|
+
pubConfigSecret = pubKey.replace(/\\n/g, '\n');
|
40
|
+
}
|
41
|
+
|
36
42
|
var recaptcha = require('../middleware/recaptcha');
|
37
43
|
|
38
44
|
|
@@ -79,7 +85,7 @@ router.post('/signup',
|
|
79
85
|
if (req.headers.authorization) {
|
80
86
|
|
81
87
|
let token = req.headers.authorization.split(" ")[1];
|
82
|
-
let decode = jwt.verify(token,
|
88
|
+
let decode = jwt.verify(token, pubConfigSecret)
|
83
89
|
if (decode && (decode.email === process.env.ADMIN_EMAIL)) {
|
84
90
|
skipVerificationEmail = true;
|
85
91
|
winston.verbose("skip sending verification email")
|