[Standards-JIG] Whose avatar?

Heiner Wolf wolf at bluehands.de
Thu Mar 31 11:12:32 UTC 2005


Hi

>I could keep the mapping between JIDs and avatar pubsub nodes in
>private XML storage, updating it as I subscribe to new avatars.  I
>could send disco items requests to all contacts on connection.  Or the
>pubsub service could support Extended Stanza Addressing, as section
>11.8 of JEP-0060 suggests.  (It seems ejabberd's mod_pubsub doesn't
>yet)
>
>Using the latter approach, how would you avoid people setting others'
>avatars to goatse or something equally unpleasant?

Yes, I guess the client has to keep the mapping from pubsub nodes to
user JID. In memory or in a file. But actually it should be persistant
and cross-host/cross-client. Private XML storage is a good idea. This is
a general problem.

What do you think about an additional "client context" in the
pubsub#event ? One lesson from programming is: If you design a callback
interface, then provide for a user context, at least 4 bytes, where the
programmer can put an object or an id to find the context in the
callback. SUBSCRIPTIONs are callbacks. The "client context" would be a
transparent string or even an XML piece. The client could store the JID
there. Or dirty stuff like a hex number of a memory address in the
software. But there might be also more interesting use. The client could
store a ticket, so that it knows, that this pubsub#event originates from
the subscription. Even if someone manages to inject messages.

I wonder why we did not think of it before. There is no callback without
user context! Remember the id-attribute of <iq/>? It's the same reason.
We are just one level higher in the protocl stack here.

Like (pubsub#event):
      <message to="romeo at montague.net" from="pubsub.shakespeare.lit">
        <x xmlns="http://jabber.org/protocol/pubsub#event">
          <items node="avatar/info/juliet at capulet.com">
            <item id="current">
              <avatar 
                xmlns="http://jabber.org/protocol/avatar"
                jid='pubsub.shakespeare.lit'
                node='avatar/data/juliet at capulet.com'
                mime-type='image/png'
                id='109f4b3c50d7b0df729d299bc6f8e9ef9066971f' />
            </item>
          </items>
--->      <context>Here could be the JID</context>
        </x>
      </message>

The context would be submitted with the subscription:
      <iq type='set'
          from='romeo at montague.net/orchard'
          to='pubsub.shakespeare.lit'
          id='sub1'>
        <pubsub xmlns='http://jabber.org/protocol/pubsub'>
          <subscribe 
              node='avatar/info/juliet at capulet.com'
              jid='romeo at montague.net'/>
--->      <context>Here could be the JID</context>
        </pubsub>
      </iq>
      
or:
      <iq type='set'
          from='romeo at montague.net/orchard'
          to='pubsub.shakespeare.lit'
          id='sub1'>
        <pubsub xmlns='http://jabber.org/protocol/pubsub'>
          <subscribe 
              node='avatar/info/juliet at capulet.com'
              jid='romeo at montague.net' >
--->        <context>Here could be the JID</context>
          </subscribe> 
        </pubsub>
      </iq>

hw
--
Dr. Klaus H. Wolf
bluehands GmbH & Co.mmunication KG
http://www.bluehands.de/people/hw
+49 (0721) 16108 75
--
Jabber enabled Virtual Presence on the Web: http://www.lluna.de/
Open Source Future History: http://www.galactic-developments.com/



More information about the Standards mailing list