Answer 200 for the trusted tables reload,
even when it's skipped (due to the disabled cache).
Change-Id: I6477bde4036df4a3a7f8ecef3ee230da2197c789
(cherry picked from commit 4f9af53a99)
(cherry picked from commit 78fb6ac49c)
Do not reload trusted table sources in hash buckets,
when the db cache mode is disabled.
This prevents sudden attempt to actually initialize hash buckets,
when the mode is 0.
Change-Id: I3e911905f1d73b94883d1f5550b6638b43b47b9f
(cherry picked from commit 8edd837fd2)
(cherry picked from commit 16ae266983)
db_redis module implicitly supports conversion
of <null> key values into empty "" strings.
Remove empty-string/zero-length guards introduced
previously, because they break this behavior.
E.g.: dialog and usrloc modules can in fact
handle <null> key values.
Additionally: introduce the memcpy() guard.
Change-Id: I96515b8a4dfea6eef16a05b5d9f970946a9fc915
(cherry picked from commit 743265a8c4)
(cherry picked from commit 06da671c6b)
Introduce a list of improvements for size overflow
protection:
- change func signatures to work with `size_t` only
- check the raw pointer and its length
- introduce optional max allowed keys size
This measure will protect inserts from extremely
large key size (e.g. negative length that then
gets into integer overflow) and from triggering
the stack canary.
Change-Id: I7e07e28b0ae398675f9980f42fe2b0f8ed61d51f
(cherry picked from commit c1876f6bae)
(cherry picked from commit 6fed6ff029)
This reverts commit 2000c2e5b5.
Reason for revert: The problem seems to be with the AVP on the configuration. Also, this check is already done before arriving at this place.
Change-Id: I0be5dd920c0cff606d4d5758908214c9fd5c7446
This patch check if the name passed to $avp was correctly initialized.
If not initialized it will print an error message and return 0 (no match).
Change-Id: Icc84f0ff1103eb759b2282bd76951a8410225910
The function mark_presentity_for_delete() is responsible for flagging
a record in the presentity table for later removal.
Previously, this was done by overwriting the etag field with a fixed, hardcoded string:
static str str_offline_etag_val = str_init("*#-OFFLINE-#*");
However, the etag is intended to uniquely identify each PUBLISH message.
Overwriting it with a constant value violates the following MySQL uniqueness constraint:
UNIQUE KEY presentity_idx (username, domain, event, etag)
For example, when handling multiple PUBLISH messages (e.g., for legA and legB of the same call),
the fields:
- username
- domain
- event
are identical, and uniqueness is ensured solely by the etag.
Replacing it with a fixed string may cause key collisions and trigger MySQL errors.
To address this without altering the database schema or indexes,
str_offline_etag_val is now appended to etag to retain its uniqueness.
Change-Id: Icfff5da5dbaae1c47b4a0f33904a64f3b98ea957