Skip to content

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

Open
@fhessel

Description

@fhessel

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

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy