File

spec/scansion/issue1121.scs @ 12953:ebe3b2f96cad

mod_tokenauth: Switch to new token format (invalidates existing tokens!) The new format has the following properties: - 5 bytes longer than the previous format - The token now has separate 'id' and 'secret' parts - the token itself is no longer stored in the DB, and the secret part is hashed - The only variable length field (JID) has been moved to the end - The 'secret-token:' prefix (RFC 8959) is now included Compatibility with the old token format was not maintained, and all previously issued tokens are invalid after this commit (they will be removed from the DB if used).
author Matthew Wild <mwild1@gmail.com>
date Tue, 21 Mar 2023 14:33:29 +0000
parent 12100:0b14b541fd27
line wrap: on
line source

# When removing roster contact, Prosody should send directed "unavailable" presence but sends global unavailable presence

[Client] Romeo
	jid: romeo@localhost
	password: password

[Client] Juliet
	jid: juliet@localhost
	password: password

-----

Romeo connects

Romeo sends
	<presence/>

Romeo receives
	<presence from="${Romeo's full JID}"/>

Juliet connects

Juliet sends
	<presence/>

Juliet receives
	<presence from="${Juliet's full JID}"/>

Romeo sends
	<presence to="juliet@localhost" type="subscribe"/>

Romeo receives
	<presence from="juliet@localhost" to="romeo@localhost"/>

Juliet receives
	<presence from="romeo@localhost" to="juliet@localhost" type="subscribe"/>

Juliet sends
	<presence to="romeo@localhost" type="subscribed"/>

Romeo receives
	<presence from="${Juliet's full JID}" to="romeo@localhost"/>

Juliet sends
	<presence to="romeo@localhost" type="subscribe"/>

Juliet receives
	<presence from="romeo@localhost" to="juliet@localhost"/>

Romeo receives
	<presence from="juliet@localhost" to="romeo@localhost" type="subscribe"/>

Romeo sends
	<presence to="juliet@localhost" type="subscribed"/>

Juliet receives
	<presence from="${Romeo's full JID}" to="juliet@localhost"/>

Romeo receives
	<presence from="${Juliet's full JID}" to="romeo@localhost"/>

Juliet sends
	<iq type="set" id="iq1">
		<query xmlns="jabber:iq:roster">
			<item jid="romeo@localhost" subscription="remove"/>
		</query>
	</iq>

Juliet receives
	<iq type="result" id="iq1"/>

Romeo receives
	<presence from="${Juliet's full JID}" to="romeo@localhost" type="unavailable"/>

Romeo disconnects