### Description
According to RFC 3261 part `7.3.1 Header Field Format` header fields values can be extended over multiple lines separated with tab (`\r\n\t`).
It seems that for many headers Kamailio support this format, but for `P-Asserted-Identity` if I try to use variable `$ai` I get error and null value
```
ERROR: |1232432423|<core> [core/parser/parse_addr_spec.c:662]: parse_addr_spec(): unexpected char [] in status 0: [] .
ERROR: |1232432423|<core> [core/parser/parse_ppi_pai.c:71]: parse_pai_ppi_body(): Error parsing PAI/PPI body 1 '<sip:+70000000000@test.com>,
<tel:+79211119987>'
```
I attach example of pcap. [pai.zip](https://github.com/kamailio/kamailio/files/7071411/pai.zip)
And below quotes from RFC 3261
```
Header fields can be extended over multiple lines by preceding each extra line with at least one SP or horizontal tab (HT)
....
Route: <sip:alice@atlanta.com>, <sip:bob@biloxi.com>,
<sip:carol@chicago.com>
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
version: kamailio 5.4.0 (x86_64/linux) 6c4fce
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: 6c4fce
compiled on 17:15:32 Jul 29 2020 with gcc 4.8.5
```
* **Operating System**:
```
CentOS Linux release 7.8.2003
```
--
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/2837
We ran into an issue recently with certificate validation and this modification to the source code helped us quickly identify the root cause. Previously we had no way of seeing which domain was invalid. I didn't like using malloc here but hopefully freeing it in the same context ensures no memory leak as well avoid any memory corruption... with the memcpy and '\0'... hope this helps...
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] 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
- [x ] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [x ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2873
-- Commit Summary --
* <a href="https://github.com/kamailio/kamailio/pull/2873/commits/b7673a8423ed17b78f81…">Expose the domain in certificate validation errors</a>
-- File Changes --
M src/modules/tls/tls_util.h (6)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2873.patchhttps://github.com/kamailio/kamailio/pull/2873.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/2873
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [*] Commit message has the format required by CONTRIBUTING guide
- [*] Commits are split per component (core, individual modules, libs, utils, ...)
- [*] Each component has a single commit (if not, squash them into one commit)
- [*] 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)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [*] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
Protocol information of pcontact was not written to mysql database
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2879
-- Commit Summary --
* <a href="https://github.com/kamailio/kamailio/pull/2879/commits/c7cf1937bfc9a36e7086…">Fix on saving protocol info for ims_usrloc_pcscf</a>
-- File Changes --
M src/modules/ims_usrloc_pcscf/usrloc_db.c (2)
M utils/kamctl/mysql/ims_usrloc_pcscf-create.sql (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2879.patchhttps://github.com/kamailio/kamailio/pull/2879.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/2879
#### 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
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [x] Related to issue #2459, #2768
#### Description
There's a small regression after #2497.
If SDP didn't have an "a=rtcp" header (RFC1889 behavior), Kamailio had thrown an Error `can't extract 'a=rtcp' IP from the SDP` on every INVITE. After the PR Kamailio does not flood into log.
Also refactored #2769.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2784
-- Commit Summary --
* nathelper: fix_nated_sdp added ignoring RFC3605-param if omitted
-- File Changes --
M src/modules/nathelper/nathelper.c (37)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2784.patchhttps://github.com/kamailio/kamailio/pull/2784.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/2784
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [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
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [x] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #2909
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2910
-- Commit Summary --
* <a href="https://github.com/kamailio/kamailio/pull/2910/commits/0b424ca7b7a8ac7f2e3e…">permissions: implement lock for trusted hash</a>
-- File Changes --
M src/modules/permissions/permissions.c (6)
M src/modules/permissions/rpc.c (6)
M src/modules/permissions/trusted.c (16)
M src/modules/permissions/trusted.h (4)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2910.patchhttps://github.com/kamailio/kamailio/pull/2910.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/2910
### Description
I fave compiled Kamailio with ASAN and enabled alignment checks (`-fno-sanitize=alignment` do not used).
And get error
```
core/cfg/cfg_script.c:120:10: runtime error: load of misaligned address 0xffff96900cdc for type 'struct cfg_script_var_t *', which requires 8 byte alignment
0xffff96900cdc: note: pointer points here
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00
```
I do not aware this is important or not.
Leave it for your review.
### Additional Information
Compiled 375f86b69e11cf835ae919873d3cd56f32d589c8
Arch aarch64
--
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/2914