HTML-escape chat messages at the server#380
Conversation
Actual it is intentional. E.g. a lot of users make use of HTML in their server welcome message. Why do you want to change this behaviour? Have you seen issues when running your fuzzing tests? BTW: It is really great that you spend time on checking the security of the Jamulus software, thanks for that! Regarding the channel name (i.e. your change |
|
I've updated the patch so it only escapes the channel name. (What got me looking at this was that I set my name to I'm not sure that QTextBrowser is really intended to be safe against people sending arbitrary bits of HTML to it, but at least the subset of HTML it currently understands is pretty small, so most of the things you can do look annoying rather than dangerous. One thing that concerns me is that you can make it open arbitrary local paths as resources - e.g. with something like |
|
Right now the chat window QTextBrowser does not have links or external links activated. So I assume that we do not have a problem right now. But we have a feature request: #360 which want external links to work. I already have written in the comments that I have security concerns with it. I'll reference your comment in that Issue. |
|
Sorry, I was not reading your comment correctly. You are concerned not about the links but resources. Can you please create a separate Issue for that? |
At present, whatever text you include in your user name or chat messages is passed through directly to the chat display window and interpreted as HTML, which I don't think is intentional. This commit fixes it by having the server escape the message when it adds the channel name and timestamp.
It's not an ideal fix because the client is still trusting arbitrary HTML sent by the server (as it does for server welcome messages, and while external links don't work, cf #360, it can include things like
<img>elements that reference local files, which isn't very nice). So maybe it'd be worth thinking about introducing a new type of protocol message where the channel name and text are separate fields?