1
0
mirror of https://github.com/moparisthebest/xeps synced 2024-11-21 16:55:07 -05:00

Cookies: add mandatory setter attribute

This commit is contained in:
Travis Burtrum 2022-03-29 23:42:09 -04:00
parent 81160186ef
commit 64489c4539

View File

@ -44,6 +44,7 @@
</ul> </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 ('urn:xmpp:tmp: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> <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>
<p>If a set-cookie child matches an already stored one with that setter's JID, then you MUST overwrite the previous value, otherwise store the new one for sending in all future stanzas.</p>
</section1> </section1>
<section1 topic='Use Cases'> <section1 topic='Use Cases'>
<section2 topic='Set-Cookies Messages'> <section2 topic='Set-Cookies Messages'>
@ -104,7 +105,7 @@
]]></example> ]]></example>
</section2> </section2>
<section2 topic='Cookies In All Outgoing Stanzas'> <section2 topic='Cookies In All Outgoing Stanzas'>
<p>After a cookie-settee has recieved cookies from a cookie-setter, it MUST include them in every outgoing stanza it sends from then on, it MUST include an appropriately namespaced extension in the stanza:</p> <p>After a cookie-settee has recieved cookies from a cookie-setter, it MUST include them in every outgoing stanza it sends from then on, and MUST include an attribute stating the JID that set them, this allows multiple cookies with the same name, it MUST include an appropriately namespaced extension in the stanza:</p>
<example caption='Cookie-settee Sends Message With Cookies'><![CDATA[ <example caption='Cookie-settee Sends Message With Cookies'><![CDATA[
<message <message
from='emilia@shakespeare.lit/mobile' from='emilia@shakespeare.lit/mobile'
@ -114,13 +115,13 @@
Than what he found himself was apt and true. Than what he found himself was apt and true.
</body> </body>
<cookies xmlns='urn:xmpp:tmp:cookies'> <cookies xmlns='urn:xmpp:tmp:cookies'>
<cohort>aoeu</cohort> <cohort setter='iago@shakespeare.lit'>aoeu</cohort>
<is-jerk>true</is-jerk> <is-jerk setter='iago@shakespeare.lit'>true</is-jerk>
<passwds> <passwds setter='iago@shakespeare.lit'>
root:$6$XC1./G1wtbS7yG6Y$MAIN1taww5nP/0aZKM1K0WeXH5cNJi6aRh2Eq1FiCguOiqo9p7WePMMKwhlRS9ZcMhpxjL3CugJTPJ0oXpdyG1:17649:::::: root:$6$XC1./G1wtbS7yG6Y$MAIN1taww5nP/0aZKM1K0WeXH5cNJi6aRh2Eq1FiCguOiqo9p7WePMMKwhlRS9ZcMhpxjL3CugJTPJ0oXpdyG1:17649::::::
emilia:$6$JdGTILrodj7J44tC$8lQYRKHjUhTxl.szIr/m7UZp1zQtWKDb75ddqbiRtl2WpSn3dAhHhA.gT93HGm9hZoZBX/4eDYpDoas5JK.tq/:18818:0:99999:7::: emilia:$6$JdGTILrodj7J44tC$8lQYRKHjUhTxl.szIr/m7UZp1zQtWKDb75ddqbiRtl2WpSn3dAhHhA.gT93HGm9hZoZBX/4eDYpDoas5JK.tq/:18818:0:99999:7:::
</passwds> </passwds>
<innocent> <innocent setter='iago@shakespeare.lit'>
H4sIAAAAAAAAA+3QQW7DIBCFYa97ijlBZSxc36J3IGWURnHAApPEt6/jdhE27SpqK/2fhEAzTwNi H4sIAAAAAAAAA+3QQW7DIBCFYa97ijlBZSxc36J3IGWURnHAApPEt6/jdhE27SpqK/2fhEAzTwNi
cjlfYvL5+bjz1+Yh2tWLtbfdDH17v2+63jbGdqZvO2tuOdMNg2mkfcxzaiXPLok0pzi59E3up/4/ cjlfYvL5+bjz1+Yh2tWLtbfdDH17v2+63jbGdqZvO2tuOdMNg2mkfcxzaiXPLok0pzi59E3up/4/
9apnTbKPITjZH84qSyxSpqf7+qjzVvbxEqpGKkFciiV4cevymjVt0Sp1csfPsW9pqRrZLesp+t2i 9apnTbKPITjZH84qSyxSpqf7+qjzVvbxEqpGKkFciiV4cevymjVt0Sp1csfPsW9pqRrZLesp+t2i