using ""%" HEX HEX" mechanism for escaping from RFC 2396
#### Pre-Submission Checklist
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
I consider it non breaking because with the existing a field containing an ASCII vertical
bar '|' would break the separator count and result in broken CDRs, etc. in this
case changing the default behavior is probably recommended, someone could abuse this
flaw.
Test: consider the following message, the '|' character in the call-id will break
the accounting event.
```
INVITE sip:+11231234567@127.0.0.101 SIP/2.0
Via: SIP/2.0/UDP 1.1.69.51:5070;rport;branch=z9hG4bKPjpM.BvWCQzoS0BJ7TgnuLF9YtmHQTlDgd
Max-Forwards: 70
Call-ID: fG8qa5Xc-iNDLhIAnuLZP|njL1sojRRD
```
With the encoding it is replaced with '%7C', no modifications should be required
to systems processing the ACC events since different behavior will only take place when
there is an invalid ACC event:
```
cat /var/log/acc/acc_129.log
INVITE|upDPn89PCIq7SLTssEGoLoSbC-jDRnfj||fG8qa5Xc-iNDLhIAnuLZP%7CnjL1sojRRD.|403|Forbidden
```
Extra comments:
I corrected the documentation on the command 'flatstore.rotate', since it was not
working, but this one is 'flatstore.k_rotate'
If I understand correctly this module was never migrated from SER to Kamailio completely
...
This change may be the only important one for operation, so I am not proposing any extra
refactoring.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1262
-- Commit Summary --
* db_flatstore: encode delimiter param
-- File Changes --
M src/modules/db_flatstore/db_flatstore.c (5)
M src/modules/db_flatstore/doc/db_flatstore.xml (14)
M src/modules/db_flatstore/doc/db_flatstore_params.xml (11)
M src/modules/db_flatstore/km_flatstore.c (15)
M src/modules/db_flatstore/km_flatstore.h (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1262.patch
https://github.com/kamailio/kamailio/pull/1262.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/1262