Fix regex eliminate ck/ik parameters in WWW-Authenticate
Fix taken from https://github.com/herlesupreeth/Kamailio_IMS_Config/pull/25
This commit is contained in:
@@ -278,8 +278,7 @@ onreply_route[REGISTER_reply]
|
||||
$var(old_hdr) = $hdr(WWW-Authenticate);
|
||||
xnotice("Old header - WWW-Authenticate=$var(old_hdr)\n");
|
||||
remove_hf("WWW-Authenticate");
|
||||
$var(new_hdr) = $(hdr(WWW-Authenticate){re.subst,/[, ]*ck=\".*\"[,]/,/gi});
|
||||
$var(new_hdr) = $(var(new_hdr){re.subst,/[, ]*ik=\".*\"[,]/,/gi});
|
||||
$var(new_hdr) = $(hdr(WWW-Authenticate){re.subst,/(, *)?(ck|ik)=\"\w+\"//gi});
|
||||
if ($(var(new_hdr){s.len}) > 0) {
|
||||
append_hf("WWW-Authenticate: $var(new_hdr)\r\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user