Skip to content

Improve JID validatoin and fix a bug when loading database messages#2102

Merged
jubalh merged 7 commits intomasterfrom
msgjid
Mar 6, 2026
Merged

Improve JID validatoin and fix a bug when loading database messages#2102
jubalh merged 7 commits intomasterfrom
msgjid

Conversation

@jubalh
Copy link
Copy Markdown
Member

@jubalh jubalh commented Mar 6, 2026

No description provided.

jubalh added 5 commits March 6, 2026 12:11
Add new `jid_is_valid()` function and improve the adherence to XMPP RFCs
in jid_create().

Add unit tests for them as well.
This one will need a localpart as well.
It should be used when we want to message a user for example.
While jid_is_valid() also returns TRUE for domain/server JIDs.
Only allow to message someone who has a nick in roster or when we pass a
user JID.
Otherwise notify the user.
If resource was NULL/"" we otherwise had a trailing slash.
@jubalh jubalh added this to the next milestone Mar 6, 2026
@jubalh jubalh self-assigned this Mar 6, 2026
jubalh added 2 commits March 6, 2026 15:05
Make jid_is_valid() allow JIDs ending with a slash (`user@domain/`).
In these cases, the parser now treats the input as a Bare JID with no
resource part, rather than rejecting it as invalid.

We will then just get `user@domain`.
log_database_get_limits_info should return NULL when a contact has no
history in the database.

We hit a bug with `/msg adsf@asd` before.
@jubalh jubalh merged commit 185e943 into master Mar 6, 2026
7 checks passed
@jubalh jubalh deleted the msgjid branch March 6, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant