Skip to content

XData: fix adhoc command FORM_TYPE duplication#83

Merged
Ri0n merged 1 commit into
psi-im:masterfrom
stokito:fix_adhoc_command_form_type
Mar 25, 2026
Merged

XData: fix adhoc command FORM_TYPE duplication#83
Ri0n merged 1 commit into
psi-im:masterfrom
stokito:fix_adhoc_command_form_type

Conversation

@stokito
Copy link
Copy Markdown
Contributor

@stokito stokito commented Mar 24, 2026

When sending adhoc command that have a form the FORM_TYPE field is also duplicated on submitting the form. For example for "User add"

<iq to="montague.net" type="set" id="42">
<command xmlns="http://jabber.org/protocol/commands" sessionid="42" node="http://jabber.org/protocol/admin#add-user">
<x xmlns="jabber:x:data" type="submit">
<field var="FORM_TYPE" type="hidden">
<value>http://jabber.org/protocol/admin</value>
</field>
<field var="FORM_TYPE" type="hidden">
<value>http://jabber.org/protocol/admin</value>
</field>
<field var="accountjid" type="jid-single">
<value>romeo@montague.net</value>
</field>
<field var="password" type="text-private">
<value>1234</value>
</field>
<field var="password-verify" type="text-private">
<value>1234</value>
</field>
</x>
</command>
</iq>

As a solution we can omit the FORM_TYPE when setting fields for a form.
This fix this and potentially other places that we didn't found.

@Ri0n Ri0n merged commit b129c83 into psi-im:master Mar 25, 2026
3 checks passed
@stokito stokito deleted the fix_adhoc_command_form_type branch March 25, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants