The code assumes that all characters require escaping and the
maximum input string length right now is 1023. When the ss7ops
module is used the length of a IAM is longer than this. Increase
the static buffer to 8k. This increases the memory usage of each
process by 7168 bytes.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/899
-- Commit Summary --
* sqlops: Increase size of static escape buffer
-- File Changes --
M src/modules/sqlops/sql_trans.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/899.patchhttps://github.com/kamailio/kamailio/pull/899.diff
--
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/pull/899
### Description
If $rU has "params" ( the username should be detected as the whole thing, no matter what chars but ':' for the password ) after calling add_uri_param() $rU points to the value without the "params".
Reading the RFC[0] (19.1 SIP and SIPS Uniform Resource Indicators) nothing seems to avoid the use of '=' and ';' in the username part
[0] https://www.ietf.org/rfc/rfc3261.txt
### Example
```
route[TEST] {
xlog("$$ru[$ru] $$rU[$rU]\n");
$rU = "whatever;rn=0000;npdi";
xlog("$$ru[$ru] $$rU[$rU]\n");
add_uri_param("user=phone");
xlog("$$ru[$ru] $$rU[$rU]\n");
return;
}
```
#### Log Messages
```
ERROR: <script>: $ru[sip:30@127.0.0.1] $rU[30]
ERROR: <script>: $ru[sip:whatever;rn=0000;npdi@127.0.0.1] $rU[whatever;rn=0000;npdi]
[...]
DEBUG: <core> [core/parser/parse_uri.c:1221]: parse_uri(): parsed uri:
type=1 user=<whatever;rn=0000;npdi>(21)
passwd=<>(0)
host=<127.0.0.1>(9)
port=<>(0): 0
params=<>(0)
headers=<>(0)
ERROR: <script>: $ru[sip:whatever;rn=0000;npdi@127.0.0.1;user=phone] $rU[whatever]
[...]
DEBUG: <core> [core/parser/parse_uri.c:1221]: parse_uri(): parsed uri:
type=3 user=<whatever>(8)
passwd=<>(0)
host=<127.0.0.1>(9)
port=<>(0): 0
params=<rn=0000;npdi>(12)
headers=<>(0)
```
### Additional Information
This is kamailio from trunk but 4.4 is affected too and I would assume previous versions too
--
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/953