Introduction
Introduction Statistics Contact Development Disclaimer Help
Fix the MD5 case for the dial command as well - warvox - VoIP based wardialing …
Log
Files
Refs
README
---
commit 25640a14a2325d67b5a745151ae2dcc111ca20b0
parent 914e2381157fc3ae3dc47e40b7b7caa568cd2b4f
Author: HD Moore <[email protected]>
Date: Mon, 2 Feb 2015 22:24:05 -0600
Fix the MD5 case for the dial command as well
Diffstat:
M lib/warvox/proto/iax2/call.rb | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/lib/warvox/proto/iax2/call.rb b/lib/warvox/proto/iax2/call.rb
@@ -121,9 +121,21 @@ class Call
# Handle authentication if its requested
if res[1] == IAX_SUBTYPE_AUTHREQ
chall = nil
- if res[2][14] == "\x00\x03" and res[1][15]
+
+ # Look for IAX_AUTH_MD5 (2) as an available auth method
+ if res[2][14].unpack("n")[0] & 2 <= 0
+ dprint("REGAUTH: MD5 authentication is not enabled on the server")
+ return
+ end
+
+ if res[2][IAX_IE_CHALLENGE_DATA]
self.dcall = res[0][0]
- chall = res[2][15]
+ chall = res[2][IAX_IE_CHALLENGE_DATA]
+ end
+
+ if chall.nil?
+ dprint("REGAUTH: No challenge data received")
+ return
end
self.client.send_authrep_chall_response(self, chall)
You are viewing proxied material from jay.scot. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.