[Pkg-voip-commits] [janus] 124/163: Fix a regression in websocket ACL.
Jonas Smedegaard
dr at jones.dk
Sat Oct 28 01:22:22 UTC 2017
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag debian/0.2.5-1
in repository janus.
commit 336d72ca3cbe941aeb049cd3b8243ae9fec7d4ec
Author: Alessandro Toppi <atoppi at meetecho.com>
Date: Mon Oct 9 11:24:52 2017 +0200
Fix a regression in websocket ACL.
---
transports/janus_websockets.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/transports/janus_websockets.c b/transports/janus_websockets.c
index 3f6835d..c4aeb0e 100644
--- a/transports/janus_websockets.c
+++ b/transports/janus_websockets.c
@@ -898,13 +898,15 @@ static int janus_websockets_common_callback(
switch(reason) {
case LWS_CALLBACK_ESTABLISHED: {
/* Is there any filtering we should apply? */
- char name[256], ip[256];
+ char ip[256];
#ifdef HAVE_LIBWEBSOCKETS_PEER_SIMPLE
- lws_get_peer_simple(wsi, name, 256);
+ lws_get_peer_simple(wsi, ip, 256);
+ JANUS_LOG(LOG_VERB, "[%s-%p] WebSocket connection opened from %s\n", log_prefix, wsi, ip);
#else
+ char name[256];
lws_get_peer_addresses(wsi, lws_get_socket_fd(wsi), name, 256, ip, 256);
-#endif
JANUS_LOG(LOG_VERB, "[%s-%p] WebSocket connection opened from %s by %s\n", log_prefix, wsi, ip, name);
+#endif
if(!janus_websockets_is_allowed(ip, admin)) {
JANUS_LOG(LOG_ERR, "[%s-%p] IP %s is unauthorized to connect to the WebSockets %s API interface\n", log_prefix, wsi, ip, admin ? "Admin" : "Janus");
/* Close the connection */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/janus.git
More information about the Pkg-voip-commits
mailing list