فهرست منبع

etc/kamailio.cfg: do not relay to foreign network if auth is not enabled

- anyone can use a local account and flood external systems

(cherry picked from commit 41f41d6d2850cdd5ab1a1b5d55bbb7ebd697ff7a)
Daniel-Constantin Mierla 7 سال پیش
والد
کامیت
3e7d1a9147
1فایلهای تغییر یافته به همراه8 افزوده شده و 0 حذف شده
  1. 8 0
      etc/kamailio.cfg

+ 8 - 0
etc/kamailio.cfg

@@ -750,6 +750,14 @@ route[AUTH] {
 		exit;
 	}
 
+#!else
+
+	# authentication not enabled - do not relay at all to foreign networks
+	if(uri!=myself) {
+		sl_send_reply("403","Not relaying");
+		exit;
+	}
+
 #!endif
 	return;
 }