Browse code

cleaned up the use of UID AVP to fix alias problem - thanks to Enrico for the bug report

Nils Ohlmeier authored on 09/01/2007 20:16:51
Showing 1 changed files
... ...
@@ -322,7 +322,7 @@ route[REGISTRAR]
322 322
 		};
323 323
 
324 324
 		# check if the authenticated user is the same as the target user
325
-		if (!lookup_user("$t.uid", "@to.uri")) {
325
+		if (!lookup_user("$tu.uid", "@to.uri")) {
326 326
 			sl_send_reply("404", "Unknown user in To");
327 327
 			drop;
328 328
 		}
... ...
@@ -334,11 +334,11 @@ route[REGISTRAR]
334 334
 
335 335
 		# check if the authenticated user is the same as the request originator
336 336
 		# you may uncomment it if you care, what uri is in From header
337
-		#if (!lookup_user("$f.uid", "@from.uri")) {
337
+		#if (!lookup_user("$fu.uid", "@from.uri")) {
338 338
 		#	sl_send_reply("404", "Unknown user in From");
339 339
 		#	drop;
340 340
 		#}
341
-		#if ($f.uid != $t.uid) {
341
+		#if ($fu.uid != $tu.uid) {
342 342
 		#	sl_send_reply("403", "Authentication and From-Header mismatch");
343 343
 		#	drop;
344 344
 		#}
... ...
@@ -386,10 +386,10 @@ route[AUTHENTICATION]
386 386
 
387 387
 	# check if the UID from the authentication meets the From header
388 388
 	$authuid = $uid;
389
-	if (!lookup_user("$f.uid", "@from.uri")) {
389
+	if (!lookup_user("$fu.uid", "@from.uri")) {
390 390
 		del_attr("$uid");
391 391
 	}
392
-	if ($fr.uid != $fr.authuid) {
392
+	if ($fu.uid != $fr.authuid) {
393 393
 		sl_send_reply("403", "Fake Identity");
394 394
 		drop;
395 395
 	}
... ...
@@ -410,7 +410,7 @@ route[OUTBOUND]
410 410
 route[INBOUND]
411 411
 {
412 412
 	# lets see if know the callee
413
-	if (lookup_user("$t.uid", "@ruri")) {
413
+	if (lookup_user("$tu.uid", "@ruri")) {
414 414
 
415 415
 		# load the preferences of the callee to have his timeout values loaded
416 416
 		load_attrs("$tu", "$t.uid");