[sr-dev] git:master: permissions: fix ws support on allow_trusted function.

Victor Seva linuxmaniac at torreviejawireless.org
Tue Aug 27 18:46:29 CEST 2013


Module: sip-router
Branch: master
Commit: bf68c071723bda24b07e64660f77872e2bceff1b
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=bf68c071723bda24b07e64660f77872e2bceff1b

Author: Victor Seva <linuxmaniac at torreviejawireless.org>
Committer: Victor Seva <linuxmaniac at torreviejawireless.org>
Date:   Tue Aug 27 18:43:39 2013 +0200

permissions: fix ws support on allow_trusted function.

Thanks to Alex Hermann <alex at speakup.nl>
Reminder: Never commit with more than one glass of wine.

---

 modules/permissions/trusted.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/permissions/trusted.c b/modules/permissions/trusted.c
index 78c0b1e..dd76a64 100644
--- a/modules/permissions/trusted.c
+++ b/modules/permissions/trusted.c
@@ -512,7 +512,7 @@ int allow_trusted_2(struct sip_msg* _msg, char* _src_ip_sp, char* _proto_sp)
 	return -1;
     }
 
-    if(proto.len<2 && proto.len>4)
+    if(proto.len<2 || proto.len>4)
 	goto error;
 
     switch(proto.s[0]) {




More information about the sr-dev mailing list