diff options
author | José Bollo <jose.bollo@iot.bzh> | 2016-05-18 12:15:56 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2016-05-18 12:15:56 +0200 |
commit | ceb2e567b5f26ff148fbc0e9526f7e7e99464000 (patch) | |
tree | 57aab609565001fa931278872c9aabc1144f9cfb /src/afb-hswitch.c | |
parent | 28158192742ead144454e071720d10bf5218a20b (diff) |
favor new names at entry for token and uuid
Change-Id: I62f9d4df7c83bf8d96ed9d89d4ab4b57146e6bb1
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/afb-hswitch.c')
-rw-r--r-- | src/afb-hswitch.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/afb-hswitch.c b/src/afb-hswitch.c index 8dee80b3..417b773e 100644 --- a/src/afb-hswitch.c +++ b/src/afb-hswitch.c @@ -86,6 +86,11 @@ int afb_hswitch_websocket_switch(struct afb_hreq *hreq, void *data) return 1; } + if (!hreq->context.validated) { + afb_hreq_reply_error(hreq, MHD_HTTP_UNAUTHORIZED); + return 1; + } + return afb_websock_check_upgrade(hreq); } |