cloudcms-server 4.0.0-beta.3 → 4.0.0-beta.5
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/middleware/perf/perf.js +3 -2
- package/middleware/stores/stores.js +1 -1
- package/package.json +2 -2
- package/util/auth.js +10 -4
- package/util/cloudcms.js +2 -2
package/middleware/perf/perf.js
CHANGED
|
@@ -194,8 +194,9 @@ exports = module.exports = function()
|
|
|
194
194
|
car = filename;
|
|
195
195
|
}
|
|
196
196
|
var regex1 = new RegExp("-[0-9a-f]{32}$"); // md5
|
|
197
|
-
var regex2 = new RegExp("-[0-9]{13}$"); // timestamp
|
|
198
|
-
|
|
197
|
+
var regex2 = new RegExp("-[0-9]{13}$"); // timestamp?
|
|
198
|
+
var regex3 = new RegExp("-[0-9]{10}$"); // epoch millis
|
|
199
|
+
if (regex1.test(car) || regex2.test(car) || regex3.test(car))
|
|
199
200
|
{
|
|
200
201
|
var x = car.lastIndexOf("-");
|
|
201
202
|
|
|
@@ -417,7 +417,7 @@ exports = module.exports = function()
|
|
|
417
417
|
var moduleStoreType = moduleDescriptors[i].store;
|
|
418
418
|
var modulePath = moduleDescriptors[i].path;
|
|
419
419
|
|
|
420
|
-
|
|
420
|
+
console.log("Config Store - Module Path: " + modulePath + ", type: " + moduleStoreType);
|
|
421
421
|
|
|
422
422
|
var storePath = path.join(modulePath, "config");
|
|
423
423
|
if (moduleStoreType === "modules")
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
},
|
|
7
7
|
"name": "cloudcms-server",
|
|
8
8
|
"description": "Cloud CMS Application Server Module",
|
|
9
|
-
"version": "4.0.0-beta.
|
|
9
|
+
"version": "4.0.0-beta.5",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "git://github.com/gitana/cloudcms-server.git"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"extend-with-super": "^2.0.0",
|
|
44
44
|
"finalhandler": "^1.2.0",
|
|
45
45
|
"form-data": "^2.3.3",
|
|
46
|
-
"gitana": "^1.0.
|
|
46
|
+
"gitana": "^1.0.323",
|
|
47
47
|
"handlebars": "^4.7.6",
|
|
48
48
|
"hbs": "^4.1.1",
|
|
49
49
|
"helmet": "^4.6.0",
|
package/util/auth.js
CHANGED
|
@@ -324,6 +324,12 @@ var syncProfile = exports.syncProfile = function(req, res, strategy, domainId, p
|
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
_LOCK([CACHE_IDENTIFIER], function(err, releaseLockFn) {
|
|
327
|
+
|
|
328
|
+
if (err) {
|
|
329
|
+
try { releaseLockFn(); } catch (e) { }
|
|
330
|
+
return callback(err);
|
|
331
|
+
}
|
|
332
|
+
|
|
327
333
|
_handleSyncUser(req, strategy, settings, key, domainId, providerId, providerUserId, token, refreshToken, userObject, groupsArray, function (err, gitanaUser) {
|
|
328
334
|
|
|
329
335
|
if (err) {
|
|
@@ -333,14 +339,14 @@ var syncProfile = exports.syncProfile = function(req, res, strategy, domainId, p
|
|
|
333
339
|
|
|
334
340
|
// no user found
|
|
335
341
|
if (!gitanaUser) {
|
|
336
|
-
releaseLockFn();
|
|
342
|
+
try { releaseLockFn(); } catch (e) { }
|
|
337
343
|
return callback();
|
|
338
344
|
}
|
|
339
345
|
|
|
340
346
|
_handleConnectAsUser(req, key, gitanaUser, function (err, platform, appHelper, key) {
|
|
341
347
|
|
|
342
348
|
if (err) {
|
|
343
|
-
releaseLockFn();
|
|
349
|
+
try { releaseLockFn(); } catch (e) { }
|
|
344
350
|
return callback(err);
|
|
345
351
|
}
|
|
346
352
|
|
|
@@ -351,8 +357,8 @@ var syncProfile = exports.syncProfile = function(req, res, strategy, domainId, p
|
|
|
351
357
|
"appHelper": appHelper,
|
|
352
358
|
"key": key
|
|
353
359
|
});
|
|
354
|
-
|
|
355
|
-
releaseLockFn();
|
|
360
|
+
|
|
361
|
+
try { releaseLockFn(); } catch (e) { }
|
|
356
362
|
|
|
357
363
|
callback(err, gitanaUser, platform, appHelper, key, platform.getDriver());
|
|
358
364
|
}, gitanaUser);
|
package/util/cloudcms.js
CHANGED
|
@@ -555,7 +555,7 @@ exports = module.exports = function()
|
|
|
555
555
|
var downloadNode = function(contentStore, gitana, repositoryId, branchId, nodeId, attachmentId, nodePath, locale, forceReload, callback)
|
|
556
556
|
{
|
|
557
557
|
// ensure path starts with "/"
|
|
558
|
-
if (nodePath && nodePath.
|
|
558
|
+
if (nodePath && !nodePath.startsWith("/")) {
|
|
559
559
|
nodePath = "/" + nodePath;
|
|
560
560
|
}
|
|
561
561
|
|
|
@@ -666,7 +666,7 @@ exports = module.exports = function()
|
|
|
666
666
|
}
|
|
667
667
|
|
|
668
668
|
// ensure path starts with "/"
|
|
669
|
-
if (nodePath && nodePath.
|
|
669
|
+
if (nodePath && !nodePath.startsWith("/")) {
|
|
670
670
|
nodePath = "/" + nodePath;
|
|
671
671
|
}
|
|
672
672
|
|