@meru2802/aux-server 1.0.0 → 1.0.2
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.
|
@@ -17,7 +17,7 @@ class HealthController extends BaseController_1.BaseController {
|
|
|
17
17
|
this.status = (req, res) => {
|
|
18
18
|
const response = {
|
|
19
19
|
service: "aux-server",
|
|
20
|
-
version: "1.0.
|
|
20
|
+
version: "1.0.2",
|
|
21
21
|
meshCentral: {
|
|
22
22
|
connected: this.isWebSocketConnected,
|
|
23
23
|
server: this.meshServer,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authMiddleware.d.ts","sourceRoot":"","sources":["../../src/middleware/authMiddleware.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKlD,qBAAa,cAAe,SAAQ,cAAc;gBACpC,gBAAgB,CAAC,EAAE,iBAAiB;IAIzC,QAAQ,GAAI,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"authMiddleware.d.ts","sourceRoot":"","sources":["../../src/middleware/authMiddleware.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKlD,qBAAa,cAAe,SAAQ,cAAc;gBACpC,gBAAgB,CAAC,EAAE,iBAAiB;IAIzC,QAAQ,GAAI,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,UA2KhE;IAEK,WAAW,GAChB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,MAAM,YAAY,KACjB,OAAO,CAAC,IAAI,CAAC,CAgFd;CACH"}
|
|
@@ -62,7 +62,6 @@ class AuthMiddleware extends BaseMiddleware_1.BaseMiddleware {
|
|
|
62
62
|
res.status(401).json(unauthorizedResponse);
|
|
63
63
|
return;
|
|
64
64
|
}
|
|
65
|
-
// Validate timestamp format and convert to number
|
|
66
65
|
let requestTime;
|
|
67
66
|
try {
|
|
68
67
|
requestTime = parseInt(timestamp.toString());
|
|
@@ -127,6 +126,7 @@ class AuthMiddleware extends BaseMiddleware_1.BaseMiddleware {
|
|
|
127
126
|
res.status(401).json(unauthorizedResponse);
|
|
128
127
|
return;
|
|
129
128
|
}
|
|
129
|
+
console.log(`HMAC Body hash: ${bodyHash}`);
|
|
130
130
|
let message;
|
|
131
131
|
try {
|
|
132
132
|
message = [
|
|
@@ -137,6 +137,7 @@ class AuthMiddleware extends BaseMiddleware_1.BaseMiddleware {
|
|
|
137
137
|
`content-type:application/json;host:${req.hostname}`,
|
|
138
138
|
bodyHash,
|
|
139
139
|
].join("\n");
|
|
140
|
+
console.log(`HMAC Message: ${message}`);
|
|
140
141
|
}
|
|
141
142
|
catch (messageError) {
|
|
142
143
|
console.error("Error constructing HMAC message:", messageError);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAE/B,eAAO,MAAM,0BAA0B;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAE/B,eAAO,MAAM,0BAA0B;;;iBAkEpC,CAAC;AAEJ,eAAO,MAAM,uBAAuB;;;iBA+BlC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;iBAkH9B,CAAC;AAEJ,eAAO,MAAM,yBAAyB;;;iBA0DpC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;kBA4BhC,CAAC;AAEZ,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,0BAA0B,CAClC,CAAC;AACF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC/E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACzE,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,yBAAyB,CACjC,CAAC;AACF,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CACnD,OAAO,8BAA8B,CACtC,CAAC"}
|
|
@@ -20,10 +20,9 @@ exports.generateDownloadLinkSchema = zod_1.default
|
|
|
20
20
|
if (identifierPart.length === 0) {
|
|
21
21
|
return false;
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
return validPattern.test(identifierPart);
|
|
23
|
+
return true;
|
|
25
24
|
}, {
|
|
26
|
-
message: "
|
|
25
|
+
message: "Mesh ID must start with 'mesh//'",
|
|
27
26
|
})
|
|
28
27
|
.refine((value) => {
|
|
29
28
|
const identifierPart = value.slice(6);
|
|
@@ -103,10 +102,9 @@ exports.addUserToGroupSchema = zod_1.default
|
|
|
103
102
|
if (identifierPart.length === 0) {
|
|
104
103
|
return false;
|
|
105
104
|
}
|
|
106
|
-
|
|
107
|
-
return validPattern.test(identifierPart);
|
|
105
|
+
return true;
|
|
108
106
|
}, {
|
|
109
|
-
message: "
|
|
107
|
+
message: "Mesh ID must start with 'mesh//'",
|
|
110
108
|
})
|
|
111
109
|
.refine((value) => {
|
|
112
110
|
const identifierPart = value.slice(6);
|