diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2017-02-28 10:37:24 +0000 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2017-02-28 11:51:16 +0000 |
commit | 07e95cd529af345fdeea230913f68eff5b925bb6 (patch) | |
tree | 6c0ca2ba948a5485e5b2884d40a2cdd24d641abb /docs/qemupciserial.inf | |
parent | e3d90312b3748431ca7c1ecb10cd4614f32f0ae3 (diff) |
io: fully parse & validate HTTP headers for websocket protocol handshake
The current websockets protocol handshake code is very relaxed, just
doing crude string searching across the HTTP header data. This causes
it to both reject valid connections and fail to reject invalid
connections. For example, according to the RFC 6455 it:
- MUST reject any method other than "GET"
- MUST reject any HTTP version less than "HTTP/1.1"
- MUST reject Connection header without "Upgrade" listed
- MUST reject Upgrade header which is not 'websocket'
- MUST reject missing Host header
- MUST treat HTTP header names as case insensitive
To do all this validation correctly requires that we fully parse the
HTTP headers, populating a data structure containing the header
fields.
After this change, we also reject any path other than '/'
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'docs/qemupciserial.inf')
0 files changed, 0 insertions, 0 deletions