summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/request/node_modules/hawk/lib/client.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/request/node_modules/hawk/lib/client.js')
-rwxr-xr-xdeps/npm/node_modules/request/node_modules/hawk/lib/client.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/deps/npm/node_modules/request/node_modules/hawk/lib/client.js b/deps/npm/node_modules/request/node_modules/hawk/lib/client.js
index 41984582a2..1002a9d517 100755
--- a/deps/npm/node_modules/request/node_modules/hawk/lib/client.js
+++ b/deps/npm/node_modules/request/node_modules/hawk/lib/client.js
@@ -54,6 +54,7 @@ exports.header = function (uri, method, options) {
!method || typeof method !== 'string' ||
!options || typeof options !== 'object') {
+ result.err = 'Invalid argument type';
return result;
}
@@ -69,11 +70,12 @@ exports.header = function (uri, method, options) {
!credentials.key ||
!credentials.algorithm) {
- // Invalid credential object
+ result.err = 'Invalid credential object';
return result;
}
if (Crypto.algorithms.indexOf(credentials.algorithm) === -1) {
+ result.err = 'Unknown algorithm';
return result;
}
@@ -156,6 +158,8 @@ exports.authenticate = function (res, credentials, artifacts, options) {
return false;
}
+ // Validate server timestamp (not used to update clock since it is done via the SNPT client)
+
if (attributes.ts) {
var tsm = Crypto.calculateTsMac(attributes.ts, credentials);
if (tsm !== attributes.tsm) {