-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't pass on zmq identities #10
Comments
Same goes for |
In other words, the question is whether
|
Maybe this means I just copy the payload over or just delete these properties before sending on. I'm mostly aiming at compatibility of the raw messages with what the websocket payload ends up being. Blobs should stay, I think I just need to convert them to one standard format. For each message that comes through currently, I'm trimming out what we don't end up having at the websockets layer (and for now, tearing out blobs): .map(msg => {
// Conform to same message format as notebook websockets
// See https://github.com/n-riesco/jmp/issues/10
delete msg.idents;
delete msg.signatureOK;
// Once we know what type blobs will be when using a websocket version of
// enchannel, we'll make it consistent here. For now, delete the prop!
delete msg.blobs;
// Recursive Object.freeze
deepFreeze(msg);
return msg;
}) The IPython widgets use the binary blobs section. Anything else relying on comms can use this for efficient transport as well. /cc @minrk |
Lo and behold, with node v4.x, a |
@rgbkrk Would it help if by default the I would like to remove socket.on("message", function(msg, isSignatureOK) { ... }); |
Likely so. It's only on the receiving end do I want them not to have the extras. Don't tear |
15c250f closes this issue. |
When would someone use a message that has an invalid signature? For testing? |
Oh... well! I knew I should've waited to publish the new version!
I think I see what you mean. Invalid messages should be logged and dropped without calling the listener.
|
Can always unpublish that version (though you'll have to use a different version number, even if just a patch). |
I've updated the README.md to advise that v0.3.0 is an alpha release. I will create a |
This commit should address this issue:
I've unpublished [email protected] on |
I've just released version 0.4.0. In this version:
|
Great! One other reason dropping messages with a bad signature is a wise idea - this helps mitigate any possible denial of service in processing invalid messages (from a bad actor). |
jmp.Message
currently has zmq identities as part of its object (which is a Buffer as well). These should only get used as part ofiopubSocket.subscribe(ident)
and should not end up being something as part of the message since it's not part of the main JSON payload.The text was updated successfully, but these errors were encountered: