[sr-dev] [kamailio/kamailio] uri.param and param.value error when last character is delimiter (#1991)
geejay101
notifications at github.com
Mon Jun 24 14:18:12 CEST 2019
### Description
I am trying to extract a parameter with transformations from an URI in Kamailio 5.2.3, Centos 7
The problem occurs with uri.param and param.value transformation when the last character of the input string is the separator. I such case an error is thrown and no parameter value can be received. The code should be fixed so that empty parameters are simply skipped.
# Example
$var(someuri) = "sip:2660926042 at 23.26.41.95:65485;app-id=7537263245341023;";
# error with uri.param
$var(appid) = $(var(someuri){uri.param,app-id});
# another error with param.value
$var(appid) = $(var(someuri){param.value,app-id});
error:
"Param name missing after ;"
The problem is here where an error is thrown for zero length params:
https://github.com/kamailio/kamailio/blob/master/src/core/parser/parse_param.c
if(_s->len == 0) {
LM_ERR("Param name missing after %c\n", separator);
goto error;
}
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1991
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20190624/3e669684/attachment.html>
More information about the sr-dev
mailing list