Skip to content
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 Accept Websocket Upgrade on non-Websocket Routes #51

Open
fhessel opened this issue Sep 18, 2019 · 0 comments
Open

Don't Accept Websocket Upgrade on non-Websocket Routes #51

fhessel opened this issue Sep 18, 2019 · 0 comments
Assignees
Labels

Comments

@fhessel
Copy link
Owner

fhessel commented Sep 18, 2019

Describe the bug
The server accept websocket upgrades on non-websocket routes.

How To Reproduce
Steps to reproduce the behavior (example):

  1. Flash the chat example to the device.
  2. Open the chat page in a browser tab.
  3. Keep the tab open and flash another example without websockets to the device.
  4. Click on the "Connect" button to send a websocket request.

Expected Behavior
The server should reject the websocket upgrade request.

Actual Behavior
The server goes into upgrade mode:

[HTTPS:I] New connection. Socket FID=55
[HTTPS:I] Request: GET /chat (FID=55)
[HTTPS:I] Upgrading to WS, FID=55

This is followed by a Guru Meditation / Panic:

Guru Meditation Error: Core  1 panic'ed (InstrFetchProhibited). Exception was unhandled.

ESP32 Module
ESP32 WROVER 16/16

Software (please complete the following information if applicable)

  • IDE and Version: PlatformIO - Home 2.3.3, Core 4.0.3
  • OS: Debian Buster
  • Client used to access the server: Firefox 60.9.0esr (64-bit)

Additional context

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

No branches or pull requests

1 participant