[Standards] media objects in data forms

Peter Saint-Andre stpeter at stpeter.im
Thu May 1 19:04:08 UTC 2008


In yesterday's XMPP Council meeting we had some discussion about whether
and how to include media objects in data forms (cf. XEP-0221):

http://logs.jabber.org/council@conference.jabber.org/2008-04-30.html#14:51:46

This matters because we need something like this so that we can include
CAPTCHAs in registration forms.

Ralph Meijer objected that he doesn't see a good place for media objects
in data forms. I proposed that we could do something like this (note the
<data/> element from XEP-0231):

<message from='victim.com'
    to='robot at spimmer.com/zombie'
    xml:lang='en'
    id='F3A6292C'>
  <challenge xmlns='urn:xmpp:tmp:challenge'>
    <x xmlns='jabber:x:data' type='form'>
    [ ... ]
      <field var='picture_recog'>
        <media xmlns='xmlns='urn:xmpp:tmp:media-element'
               height='150'
               width='150'>
          <uri type='image/jpeg'>
            http://www.victim.com/challenges/picture.jpeg?F3A6292C
         </uri>
==>      <data xmlns='urn:xmpp:tmp:data-element'
==>        cid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6 at victim.com
==>      </data>
        </media>
      </field>
    [ ... ]
    </x>
  </challenge>
</message>

Then if the recipient needs to retrieve the data via XMPP (e.g., because
it cannot access sites via HTTP because of socket limitations) it can do
so as described in XEP-0231:

<iq from='robot at spimmer.com/zombie'
    id='get-data-1'
    to='victim.com'
    type='get'>
  <data xmlns='urn:xmpp:tmp:data-element'
        cid='f81d4fae-7dec-11d0-a765-00a0c91e6bf6 at victim.com'/>
</iq>

Alternatively, we could specify that the <media/> element shall contain
only URIs and never direct data (which is essentially what the cid: URL
does). Or we we could not use cid: URLs at all but instead define a new
URI scheme (or reuse the xmpp: scheme with a special action) for data
reference and retrieval.

Thoughts?

Peter

-- 
Peter Saint-Andre
https://stpeter.im/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 7338 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.jabber.org/pipermail/standards/attachments/20080501/07e8a14f/attachment.bin>


More information about the Standards mailing list