8000 Broker websocket API doesn't like JSON strings with unicode escaping · Issue #457 · zeek/broker · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Broker websocket API doesn't like JSON strings with unicode escaping #457

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

Open
simeonmiteff opened this issue Oct 24, 2024 · 6 comments
Open
Assignees

Comments

@simeonmiteff
Copy link

I encountered this while trying to send a string with HTML entities in it (e.g., <ohai>), and discovering that my JSON library (un?) helpfully escapes them as follows:

{"@data-type":"string","data":"\u003cohai\u003e"}

I will patch https://github.com/corelight/go-zeek-broker-ws to turn off the HTML entity escaping feature and avoid this problem (I don't think we care about crappy browser security issues, and broker/CAF is happy to deserialise the string with HTML entities), but not handling escaped characters is probably a bug worth fixing.

@Neverlord
Copy link
Member

not handling escaped characters is probably a bug worth fixing

Absolutely. We actually already have someone working on this (actor-framework/actor-framework#1949), so I'll take care that the fix finds its way to Broker/Zeek.

@simeonmiteff
Copy link
Author

Much appreciated @Neverlord

@MP-Corelight
Copy link

@Neverlord, any chance this was resolved? I see that the PR you referenced above has merged.

@MP-Corelight
Copy link

Note: If this remains an open issue in Broker, we may recommend switching to the Zeek-based websocket implementation in v8.0 instead of continuing to work on the Broker websockets.

@ckreibich ckreibich transferred this issue from zeek/zeek May 1, 2025
@awelzel
Copy link
Contributor
awelzel commented May 6, 2025

Note: If this remains an open issue in Broker, we may recommend switching to the Zeek-based websocket implementation in v8.0 instead of continuing to work on the Broker websockets.

That's not a valid proposal for this bug. The Zeek-based websocket implementation uses the existing broker functionality for JSON serialization/deserialization purposes, so that bug exists there as well.

@Neverlord
Copy link
Member

@awelzel ah, thanks for chiming in! I'll pull in the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

4 participants
0