You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for (var i = now - ALLOWED_CLOCK_SKEW; i <= now + ALLOWED_CLOCK_SKEW; i ++) {
var raw = token + SHARED_SECRET + i;
var shaObj = new jsSHA("SHA-256", "TEXT");
shaObj.update(raw);
var hash = shaObj.getHash("HEX");
if (hash === signature) {
return preBodyToHeaders.ReturnData(req, sess.meta_data);
}
}
Current implementation checks from now - ALLOWED_CLOCK_SKEW to now + ALLOWED_CLOCK_SKEW.
More appropriate would be to check from now, and work out to avoid needless hash checking.
The text was updated successfully, but these errors were encountered:
Current implementation checks from
now - ALLOWED_CLOCK_SKEW
tonow + ALLOWED_CLOCK_SKEW
.More appropriate would be to check from now, and work out to avoid needless hash checking.
The text was updated successfully, but these errors were encountered: