Re: [Standards] roster schema

2007-06-24 Thread Mridul Muralidharan

Peter Saint-Andre wrote:

Currently, the XML schema for the jabber:iq:roster namespace does not
limit the length of an item name or a group name. I think that might
cause problems. In particular I think it might be good to specify that:

1. The 'name' attribute can be a string between 0 and 1023 characters in
length. [1]

2. The XML character data of the group/ element can be a string
between 1 and 1023 characters in length.

Objections?

/psa

[1] I am assuming that the following are equivalent:

item jid='[EMAIL PROTECTED]'
  name=''/

item jid='[EMAIL PROTECTED]'/

If we don't like name='' then we could specify that the
'name' attribute must be of non-zero length. But I see no
harm in saying that including name='' in a roster set is
equivalent to not including the 'name' attribute.



+1 for specifying upper limit for octets for each.
Naturally there are existing limits to this, but those are 
implementation details - something standard will give both clients and 
servers a upper limit confidence.


Regards,
Mridul

PS: Strange, I was discussing about this with some others just a couple 
of weeks back :)


Re: [Standards] roster schema

2007-06-24 Thread Joe Hildebrand

What do you mean by character?
- Glyph?
- Codepoint?

Do you have to perform some sort of canonicalization before counting?
Combining characters make this particularly difficult, which is why  
we settled on something easy to describe and understand in JIDs.


On Jun 24, 2007, at 7:39 AM, Matthias Wimmer wrote:


Hi Joe!

Joe Hildebrand schrieb:

+1 for limiting it.
However, 1024 octets please, rather than characters, like JIDs.


+1 for limiting it

... but please based on characters, not on octets. (I also voted  
against limiting JIDs based on octets.)


Reasons:
- Modern database systems as well as modern programming languages  
do store characters, not bytes.
- XMPP is based on top of XML and XML does handle characters, not  
bytes. (e.g. you cannot store a NULL byte in XML, even not as an  
entity)
- A limitation based on characters is what a user will expect.  
(e.g. Why can I enter 1024 times the letter 'a' here but only 341  
times the character €?)
- In GUI forms you can often already limit the number of characters  
a user can enter, but mostly you cannot limit the number of octets  
the UTF-8 representation of the string the user has entered.


... I'd even propose that the JID limitation should be changed to  
characters in RFC3920bis.



Matthias




Re: [Standards] roster schema

2007-06-24 Thread Michal 'vorner' Vaner
Hello

On Sun, Jun 24, 2007 at 11:01:26AM -0400, Andrew Plotkin wrote:
  On Sun, 24 Jun 2007, Michal 'vorner' Vaner wrote:
 
  And it would seem more reasonable to specify (or allow servers to do so)
  the limit of stanza? Because it is not only the roster then, but private
  storage, privacy lists...
 
  If there must be a limit, then I think the limit should be enforcible by
  the server, and if server wants to have 2047, then why not?
 
  Only if we can guarantee that there will never be cases where one server has 
  to store (or cache) another server's entry. That's a worrisome promise to 
  make.
 
  A fixed limit also makes it easier for an admin to migrate server software 
  transparently to his users.

With users that store books in their rosters ;-) As I said, such user
deserves odd behaviour.

  I admit that not a lot of people are going to hit this edge case, but in 
  principle...

I just do not like setting hard limits in protocol when they do not come
out from the logic. I accept there is no need for such long names now
and probably will not be at any time, but if I ask why on earth 1023?

There were points where there was no choice to put a hard limit (ipv4,
for example). But I do not like this limit in the protocol because of
someone might be crazy. Is there a limit for size of EMail in the
protocol? No, there isn't, if the server considers it to be too big,
it tells you. But the too big grows with time, varies by the server
and so on.

And as I said, if there is a problem with roster items, is there problem
with private storage, privacy list and so on? Will all of them be
limited?

What is the problem with saying the server can have a limit and deny to
perform such crazy operation.

(BTW, did it happen that someone stored so long string somewhere, or is
it just a _possible_ problem?)

-- 
There is one difference between linux and windows.
With windows, you pay for the software, but you get all the T-shirts for free.
With linux, you get all the software for free, but you buy the T-shirts.

Michal 'vorner' Vaner


pgpzfpRQZkcLn.pgp
Description: PGP signature