X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-hswitch.c;fp=src%2Fafb-hswitch.c;h=417b773ee89343786c4c4a188b558162cfb6d257;hb=ceb2e567b5f26ff148fbc0e9526f7e7e99464000;hp=8dee80b3defad46182b57cdf98206d58739c3e48;hpb=28158192742ead144454e071720d10bf5218a20b;p=src%2Fapp-framework-binder.git 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); }