Skip to content

Commit

Permalink
Include version field in registration response
Browse files Browse the repository at this point in the history
This should fix issue #57
  • Loading branch information
prefiks committed Jul 29, 2017
1 parent 415bfdf commit d388f01
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ext/index.js
Expand Up @@ -167,7 +167,10 @@ function _execBin(event, origin, challenges, checkSignChallenges, callbackid, wo
log("emit end");
emit(cmd.stdin, "end");
} else {
worker.port.emit("U2FRequestResponse", callbackid, JSON.parse(response.value.substr(5, len)));
let json = JSON.parse(response.value.substr(5, len));
if (!json.version && json.registrationData)
json.version = "U2F_V2";
worker.port.emit("U2FRequestResponse", callbackid, json);
response.value = response.value.substr(5 + len);
response.responded = true;
}
Expand Down

0 comments on commit d388f01

Please sign in to comment.