From 86773a83bbdd2c2e9e9a50ba908cabe2fef0ad8a Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 30 Sep 2020 16:07:07 +0200 Subject: [PATCH] relay: strip leading slash from session id --- src/villas-relay.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/villas-relay.cpp b/src/villas-relay.cpp index 921d6885d..206ebea5d 100644 --- a/src/villas-relay.cpp +++ b/src/villas-relay.cpp @@ -81,10 +81,10 @@ RelaySession * RelaySession::get(lws *wsi) /* Get path of incoming request */ lws_hdr_copy(wsi, uri, sizeof(uri), WSI_TOKEN_GET_URI); - if (strlen(uri) <= 0) + if (strlen(uri) <= 1) throw InvalidUrlException(); - Identifier sid = uri; + Identifier sid = uri + 1; auto it = sessions.find(sid); if (it == sessions.end()) {