Ver Fonte

kamailio.cfg: tighten the auth checks for PUBLISH

- based on a patch by Klaus Darilion
Daniel-Constantin Mierla há 14 anos atrás
pai
commit
8d16577bbc
1 ficheiros alterados com 11 adições e 1 exclusões
  1. 11 1
      etc/kamailio.cfg

+ 11 - 1
etc/kamailio.cfg

@@ -677,10 +677,20 @@ route[AUTH] {
 			}
 			if (is_method("PUBLISH"))
 			{
-				if ($au!=$tU) {
+				if ($au!=$fU || $au!=$tU) {
 					sl_send_reply("403","Forbidden auth ID");
 					exit;
 				}
+				if ($au!=$rU) {
+					sl_send_reply("403","Forbidden R-URI");
+					exit;
+				}
+#!ifdef WITH_MULTIDOMAIN
+				if ($fd!=$rd) {
+					sl_send_reply("403","Forbidden R-URI domain");
+					exit;
+				}
+#!endif
 			} else {
 				if ($au!=$fU) {
 					sl_send_reply("403","Forbidden auth ID");