Avoid to give UAToken on WA registration process. We map using the conne... #25

Merged
merged 2 commits into from Sep 5, 2012

Projects

None yet

3 participants

@frsela
Member
frsela commented Sep 5, 2012

...ction object

@travisbot

This pull request fails (merged e550d54 into e185523).

@willyaranda willyaranda commented on the diff Sep 5, 2012
src/ns_ua/ws_server.js
@@ -158,7 +158,12 @@ server.prototype = {
case "registerWA":
log.debug("WS::onWSMessage::registerWA --> Application registration message");
var appToken = crypto.hashSHA256(query.data.watoken + query.data.pbkbase64);
- dataManager.registerApplication(appToken, query.data.uatoken, query.data.pbkbase64, function(ok) {
+ if(!dataManager.getUAToken(connection)) {
+ log.error("No UAToken found for this connection !");
@willyaranda
willyaranda Sep 5, 2012 Contributor

Apart from logging the error, we need to send with connection.sendUTF() a message to the user to show what happened.

The connection is still closed at the end of the function.

@frsela
frsela Sep 5, 2012 Member

That's right !

@willyaranda willyaranda merged commit fe0b9fd into telefonicaid:develop Sep 5, 2012

1 check failed

default The Travis build failed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment