question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[URGENT]: Cookies contianing some special characters crash the WatsonWebsocketServer

See original GitHub issue

I’ve been experimenting the whole day and this is the result. If the client has a cookie that includes some special characters, the following error occurs and the server stops:

[WatsonWsServer] listener exception:
System.ArgumentException: Specified value has invalid Control characters. (Parameter 'value')
   at System.Net.HttpValidationHelpers.CheckBadHeaderValueChars(String value)
   at System.Net.WebHeaderCollection.Add(String name, String value)
   at Interop.HttpApi.GetHeaders(IntPtr memoryBlob, IntPtr originalAddress)
   at System.Net.HttpListenerRequest.get_Headers()
   at System.Net.HttpListenerRequest.get_IsWebSocketRequest()
   at WatsonWebsocket.WatsonWsServer.AcceptConnections(CancellationToken cancelToken)

I’m sorry, I can’t provide a list containing all these special characters

P.S.: Also it would be so awesome if a ClientMetadata could have the clientside cookies. It would make for example loginToken checking much easier and efficient.

Issue Analytics

  • State:closed
  • Created 7 months ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jchristncommented, Feb 24, 2023

Thanks @WarstekHUN I wish I could implement changes in the underlay that this library uses. Hopefully at least in this case the server doesn’t crash on you 😃 Cheers! PS thank you so much for letting me know!

1reaction
jchristncommented, Feb 24, 2023

Hi @WarstekHUN I just published v4.0.8 which has a fix in the AcceptConnections method to not exit when such a situation is encountered. Please re-open if the issue persists or you encounter another problem! Also added you to the README.

NuGet: https://www.nuget.org/packages/WatsonWebsocket/4.0.8 Commit: https://github.com/jchristn/WatsonWebsocket/commit/df03318326d31bd4c8fb2ef92455e247ef4cf947

Read more comments on GitHub >

github_iconTop Results From Across the Web

Untitled
#Open Anthony florio merrill lynch, How to get rid of black elbows at home, Hotels with hot tubs in murfreesboro tn, Old lobster...
Read more >
Untitled
Dhyeya ias app download, Ironhead sportster engine performance, How to grow on youtube with forums, Buckaroo hats flat brim, Cugundurun xeyirleri, ...
Read more >
Fix list for IBM WebSphere Application Server Liberty
This is a complete listing of all the fixes for Liberty with the latest fixes at the top. New fix pack numbering is...
Read more >
AI / Machine Learning
Find documentation, API & SDK references, tutorials, FAQs, and more resources for IBM Cloud products and services.
Read more >
Untitled
Kode metropolismania 2 ps2, D'angelo group porto sant'elpidio, Commercial characters 2013, Toyota supra 1998 information, Hospices de beaune 2011, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found