Re: [jdev] Escaping JID using XEP-0106

2007-07-04 Thread David Ammouial
On Dimecres 27 Juny 2007, Matthias Wimmer wrote:
 (Don't know how I created They one to have.)

I think you meant They want to have, which sounds similar when you speak 
the sentence mentally before typing it ;)

-- 
David


signature.asc
Description: This is a digitally signed message part.


Re: [jdev] Escaping JID using XEP-0106

2007-06-28 Thread Tomasz Sterna
Dnia 27-06-2007, śro o godzinie 15:34 +0400, Sergei Golovan napisał(a):
 I didn't see any XMPP client, which requires to enter node and server
 separately in send message dialogs (I did see clients which asks for
 chatroom names).

Just because others had teken the easy path (for developer, not the
user), doesn't mean you should also.


 In general, I can show unescaped JID. But what's the idea of XEP-0106 then?

To allow inserting characters disallowed by RFC into JID parts and
transfer them on the wire.


 Unfortunately, it means that to be able to send message to such a
 strange JID the user has to khow how to escape it. Should users read
 XEPs? :)

No. Machines (for example your application) should do the escaping.


Maybe if you could explain the use-case which you need the escaping for,
we could find a reasonable solution for your application.



-- 
Tomasz Sterna
Xiaoka Grp.  http://www.xiaoka.com/



Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Tomasz Sterna
Dnia 27-06-2007, śro o godzinie 12:53 +0400, Sergei Golovan napisał(a):
 Could someone clarify how to escape the following JID (and to split it
 into node, server and resource)?
 
 [EMAIL PROTECTED]/[EMAIL PROTECTED]/resource 

This is not a JID.
(in other words: this is invalid JID)

There is no way of telling which part is a node, domain, resource.
You need to escape it FIRST (using XEP-0106) to be a valid JID before
trying to parse/split it.


-- 
Tomasz Sterna
Xiaoka Grp.  http://www.xiaoka.com/



Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Sergei Golovan

On 6/27/07, Tomasz Sterna [EMAIL PROTECTED] wrote:

Dnia 27-06-2007, śro o godzinie 12:53 +0400, Sergei Golovan napisał(a):
 Could someone clarify how to escape the following JID (and to split it
 into node, server and resource)?

 [EMAIL PROTECTED]/[EMAIL PROTECTED]/resource

This is not a JID.
(in other words: this is invalid JID)

There is no way of telling which part is a node, domain, resource.
You need to escape it FIRST (using XEP-0106) to be a valid JID before
trying to parse/split it.


You're right. And the question is: How to escape it? Can escaping be
done unambiguously?

The problem is that if I get alredy escaped JID
[EMAIL PROTECTED]/resource then I can unescape it
and show to a user as [EMAIL PROTECTED]/[EMAIL PROTECTED]/resource.

But what to do if a user enters such a JID into a client entry box and
wants to send a message to it?

Best wishes!
--
Sergei Golovan


Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Norman Rasmussen

On 6/27/07, Sergei Golovan [EMAIL PROTECTED] wrote:


You're right. And the question is: How to escape it? Can escaping be
done unambiguously?



Yes, but only if you already know the split.

The problem is that if I get alredy escaped JID

[EMAIL PROTECTED]/resource then I can unescape it
and show to a user as [EMAIL PROTECTED]/[EMAIL PROTECTED]/resource.

But what to do if a user enters such a JID into a client entry box and
wants to send a message to it?



You have to provider two entry boxes, or require the the user enter a
pre-escaped jid, and reject the ambiguous jid.

--
- Norman Rasmussen
- Email: [EMAIL PROTECTED]
- Home page: http://norman.rasmussen.co.za/


Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Tomasz Sterna
Dnia 27-06-2007, śro o godzinie 15:03 +0400, Sergei Golovan napisał(a):
 You're right. And the question is: How to escape it? Can escaping be
 done unambiguously?

Yes. You have a node, domain and resource which you need to escape
before concatenating them into JID.


 The problem is that if I get alredy escaped JID
 [EMAIL PROTECTED]/resource then I can unescape it
 and show to a user as [EMAIL PROTECTED]/[EMAIL PROTECTED]/resource.

Well... You shouldn't show such a monstrosity to a user.
Use the JID parts wisely. Show username, domain eventually resource.


 But what to do if a user enters such a JID into a client entry box and
 wants to send a message to it? 

It's an invalid entry and you should return an error to the user.
You've asked for a JID and the text entered isn't a valid JID.
There is no way of telling which part is what without some external
information.


-- 
Tomasz Sterna
Xiaoka Grp.  http://www.xiaoka.com/



Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Matthias Wimmer
Hi Tomasz!

Tomasz Sterna schrieb:
 Dnia 27-06-2007, śro o godzinie 12:53 +0400, Sergei Golovan napisał(a):
 Could someone clarify how to escape the following JID (and to split it
 into node, server and resource)?

 [EMAIL PROTECTED]/[EMAIL PROTECTED]/resource 
 
 This is not a JID.
 (in other words: this is invalid JID)

It is a valid JID.

Node: user
Domain: jabber.org
Resource: [EMAIL PROTECTED]/resource

The resource is allowed to contain '@' as well as '/'. Everything behind
the first '/' character in a JID is the resource.



Matthias

-- 
Matthias Wimmer  Fon +49-700 77 00 77 70
Züricher Str. 243Fax +49-89 95 89 91 56
81476 Münchenhttp://ma.tthias.eu/



Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Matthias Wimmer
Matthias Wimmer schrieb:
 The resource is allowed to contain '@' as well as '/'. Everything behind
 the first '/' character in a JID is the resource.

... but this has nothing to do with XEP-0106 BTW.

XEP-0106 is about mapping non-JID addresses in a JID. e.g. if you have a
E-Mail address, that cannot map directly in a JID you will use XEP-0106.


Matthias

-- 
Matthias Wimmer  Fon +49-700 77 00 77 70
Züricher Str. 243Fax +49-89 95 89 91 56
81476 Münchenhttp://ma.tthias.eu/



Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Sergei Golovan

On 6/27/07, Norman Rasmussen [EMAIL PROTECTED] wrote:

On 6/27/07, Sergei Golovan [EMAIL PROTECTED] wrote:
 You're right. And the question is: How to escape it? Can escaping be
 done unambiguously?

Yes, but only if you already know the split.


So, a full unsecaped JID (with resource) can't be split unambiguously.
Then I'm afraid we should do something with the XEP.



 The problem is that if I get alredy escaped JID
 [EMAIL PROTECTED]/resource then I can
unescape it
 and show to a user as
[EMAIL PROTECTED]/[EMAIL PROTECTED]/resource.

 But what to do if a user enters such a JID into a client entry box and
 wants to send a message to it?

You have to provider two entry boxes, or require the the user enter a
pre-escaped jid, and reject the ambiguous jid.


There is another problem here. If the user receives message from
[EMAIL PROTECTED]/resource I can't unescape JID
because he will not know if the message came from [EMAIL PROTECTED]
Using two entry boxes is not good IMHO. It breaks the idea of JID -
the only user identifier in XMPP world.

--
Sergei Golovan


Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Sergei Golovan

On 6/27/07, Matthias Wimmer [EMAIL PROTECTED] wrote:

Matthias Wimmer schrieb:
 The resource is allowed to contain '@' as well as '/'. Everything behind
 the first '/' character in a JID is the resource.

... but this has nothing to do with XEP-0106 BTW.

XEP-0106 is about mapping non-JID addresses in a JID. e.g. if you have a
E-Mail address, that cannot map directly in a JID you will use XEP-0106.


As far as I understand, XEP-0106 is also about visual representation
of JID. And I think that if two different JIDs have one visual
representation then it's bad.

--
Sergei Golovan


Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Matthias Wimmer
Hi Sergei!

Ah okay ... it seems I start understanding what you are trying to do.
You want to map a JID (or something like that) into another JID, e.g.
for building the infamous Jabber-Jabber transport.

Sergei Golovan schrieb:
 So, a full unsecaped JID (with resource) can't be split unambiguously.
 Then I'm afraid we should do something with the XEP.

You will always only handle escaped JIDs when splitting the JID.

If you do unescape the JID, you should do this to get back the mapped
address.

E.g. if you unescape [EMAIL PROTECTED] you do not get back
[EMAIL PROTECTED] and not [EMAIL PROTECTED]@jabber.org.

Compare this with the escaping in XML:

If you map elementthis is XML/element in an XHTML document you get:

plt;elementgt;this is XMLlt;/elementgt;/p

You will also only be able to unescape the content of the p/ element
without creating a mess. If you would just unescape everything you would
get pelementthis is XML/element/p and with that also no XML
parser could understand what of this is your XHTML and what is your XML
document you wrapped.



Matthias

-- 
Matthias Wimmer  Fon +49-700 77 00 77 70
Züricher Str. 243Fax +49-89 95 89 91 56
81476 Münchenhttp://ma.tthias.eu/



Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Sergei Golovan

On 6/27/07, Tomasz Sterna [EMAIL PROTECTED] wrote:

Dnia 27-06-2007, śro o godzinie 15:03 +0400, Sergei Golovan napisał(a):
 You're right. And the question is: How to escape it? Can escaping be
 done unambiguously?

Yes. You have a node, domain and resource which you need to escape
before concatenating them into JID.


I didn't see any XMPP client, which requires to enter node and server
separately in send message dialogs (I did see clients which asks for
chatroom names).




 The problem is that if I get alredy escaped JID
 [EMAIL PROTECTED]/resource then I can unescape it
 and show to a user as [EMAIL PROTECTED]/[EMAIL PROTECTED]/resource.

Well... You shouldn't show such a monstrosity to a user.
Use the JID parts wisely. Show username, domain eventually resource.


In general, I can show unescaped JID. But what's the idea of XEP-0106 then?




 But what to do if a user enters such a JID into a client entry box and
 wants to send a message to it?

It's an invalid entry and you should return an error to the user.
You've asked for a JID and the text entered isn't a valid JID.
There is no way of telling which part is what without some external
information.


Unfortunately, it means that to be able to send message to such a
strange JID the user has to khow how to escape it. Should users read
XEPs? :)

--
Sergei Golovan


Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Matthias Wimmer
Hi Sergei!

Sergei Golovan schrieb:
 I didn't see any XMPP client, which requires to enter node and server
 separately in send message dialogs (I did see clients which asks for
 chatroom names).

In address fields you will only enter escaped JIDs.

But you could for example use a Jabber service (e.g. an SMTP transport)
where you send an e-mail address to and you get back the mapped e-mail
address as an escaped JID. This is what to old jabber:iq:gateway
protocol did and what can now be done with data forms.


Matthias

-- 
Matthias Wimmer  Fon +49-700 77 00 77 70
Züricher Str. 243Fax +49-89 95 89 91 56
81476 Münchenhttp://ma.tthias.eu/



Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Sergei Golovan

On 6/27/07, Matthias Wimmer [EMAIL PROTECTED] wrote:

Hi Sergei!

Ah okay ... it seems I start understanding what you are trying to do.
You want to map a JID (or something like that) into another JID, e.g.
for building the infamous Jabber-Jabber transport.


Not exactly. I want to implement XEP-0106 in Tkabber and the idea was
to show only unescaped JIDs to a user. But since different escaped
(real) JIDs map to one escaped JID then it's impossible (user should
definitely know who sent the message).

My current yhought is the following: to show unescaped JID if and only
if it can be escaped unambiguously.

But this approach isn't good too (appending different resources we may
break unescaping of any bare JID).

So, probably I will not unescape / and @ in nodes. It should solve ambuguity.

Or may be hiding real (escaped) JIDs from the user is a bad idea at all?

Best wishes!
--
Sergei Golovan


Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Matthias Wimmer
HI Sergei!

Sergei Golovan schrieb:
 Or may be hiding real (escaped) JIDs from the user is a bad idea at all?

In fields where a general JID is expected, I'd say you should display
the full (escaped) JID. - As only this one is a JID.

The whole fuzz about escaping is just to make something a JID, that
wouldn't be one else. So if you need a JID you will always display the
result of the escaping.

IMO you only do unescaping, if you want to display something that is not
a JID but the original address. And you should only do this on places
where the user is aware about the fact, that he does not see a JID, but
an other address.


Matthias

-- 
Matthias Wimmer  Fon +49-700 77 00 77 70
Züricher Str. 243Fax +49-89 95 89 91 56
81476 Münchenhttp://ma.tthias.eu/



Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Sergei Golovan

On 6/27/07, Matthias Wimmer [EMAIL PROTECTED] wrote:

HI Sergei!

Sergei Golovan schrieb:
 Or may be hiding real (escaped) JIDs from the user is a bad idea at all?

In fields where a general JID is expected, I'd say you should display
the full (escaped) JID. - As only this one is a JID.

The whole fuzz about escaping is just to make something a JID, that
wouldn't be one else. So if you need a JID you will always display the
result of the escaping.

IMO you only do unescaping, if you want to display something that is not
a JID but the original address. And you should only do this on places
where the user is aware about the fact, that he does not see a JID, but
an other address.


I see. Table 3 in section 5.1 confused me a bit (especially column
User Input). So, if I want to show unescaped JID it's better to show
only a node (if it's appropriate). It seems to be too complicated.
Thanks anyway.

--
Sergei Golovan


Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Mridul Muralidharan

Sergei Golovan wrote:

On 6/27/07, Norman Rasmussen [EMAIL PROTECTED] wrote:

On 6/27/07, Sergei Golovan [EMAIL PROTECTED] wrote:
 You're right. And the question is: How to escape it? Can escaping be
 done unambiguously?

Yes, but only if you already know the split.


So, a full unsecaped JID (with resource) can't be split unambiguously.
Then I'm afraid we should do something with the XEP.


I think you are confused about the intent about the xep here.
The xep allows you to encode unallowed characters such that they can be 
used as part of the jid.

You decode after splitting the jid into its constituents, not before.

So, [EMAIL PROTECTED] is a valid jid, while 
[EMAIL PROTECTED]@sun.com makes no sense - and intent of the xep is not to 
make any sense of it.
You take the node (mridul\40test.com), and then decode it for your 
purpose ([EMAIL PROTECTED]) - not as part of the jid.







 The problem is that if I get alredy escaped JID
 [EMAIL PROTECTED]/resource then I can
unescape it
 and show to a user as
[EMAIL PROTECTED]/[EMAIL PROTECTED]/resource.

 But what to do if a user enters such a JID into a client entry box and
 wants to send a message to it?

You have to provider two entry boxes, or require the the user enter a
pre-escaped jid, and reject the ambiguous jid.


There is another problem here. If the user receives message from
[EMAIL PROTECTED]/resource I can't unescape JID
because he will not know if the message came from [EMAIL PROTECTED]
Using two entry boxes is not good IMHO. It breaks the idea of JID -
the only user identifier in XMPP world.



Why would you want to unescape it ?
The identifier of the contact is user\40jabber.org\2fuser in xmpp world.
The node by itself conveys no meaning other than when associated with 
the full jid.


Regards,
Mridul


Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Mridul Muralidharan

Sergei Golovan wrote:

On 6/27/07, Matthias Wimmer [EMAIL PROTECTED] wrote:

Matthias Wimmer schrieb:
 The resource is allowed to contain '@' as well as '/'. Everything 
behind

 the first '/' character in a JID is the resource.

... but this has nothing to do with XEP-0106 BTW.

XEP-0106 is about mapping non-JID addresses in a JID. e.g. if you have a
E-Mail address, that cannot map directly in a JID you will use XEP-0106.


As far as I understand, XEP-0106 is also about visual representation
of JID. And I think that if two different JIDs have one visual
representation then it's bad.



It is not about visual representation.
xep 106 is about encoding pieces of the jid such that they are compliant 
with xmpp requirements in a standard way.


Mridul


Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Sergei Golovan

On 6/27/07, Mridul Muralidharan [EMAIL PROTECTED] wrote:


It is not about visual representation.
xep 106 is about encoding pieces of the jid such that they are compliant
with xmpp requirements in a standard way.


Then I would like to ask who should escape JIDs and when? I don't
think that users will read XEP and escape desired characters.

One possible question is: user's client during registration process.
And user will be surprised looking at his new brand escaped JID.

--
Sergei Golovan


Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Sergei Golovan

On 6/27/07, Mridul Muralidharan [EMAIL PROTECTED] wrote:

Why would you want to unescape it ?
The identifier of the contact is user\40jabber.org\2fuser in xmpp world.
The node by itself conveys no meaning other than when associated with
the full jid.


Citing XEP-0106:  Typically, unescaping is performed only by a client
that wants to display JIDs containing escaped characters to a human
user, or by a gateway to some external system (e.g., email or LDAP)
that needs to generate identifiers for foreign systems.

The second purpose is clear, but the first (display to a human user)
is not so clear for me now.

--
Sergei Golovan


Re: [jdev] Escaping JID using XEP-0106

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

On Wed, Jun 27, 2007 at 01:11:03PM +0200, Norman Rasmussen wrote:
  On 6/27/07, Sergei Golovan [EMAIL PROTECTED] wrote:
 
  You're right. And the question is: How to escape it? Can escaping be
  done unambiguously?
 
 
  Yes, but only if you already know the split.

Is there a way the server part could contain @? I hope a domain name
can't contain it. I would take the last @ as the actual separator and
leave all the before as just part of the node (same as with email, where
you can have address like @@host.com, where the local name on host is
really @).

Do you think there may be a problem with this approach?

-- 
Wait few minutes before opening this email. The temperature difference 
could lead to vapour condensation.

Michal 'vorner' Vaner


pgpMHChIspdIz.pgp
Description: PGP signature


Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Sergei Golovan

On 6/27/07, Matthias Wimmer [EMAIL PROTECTED] wrote:

The same way XEP-0106 is not about allowing nice new characters and
displaying them animated in high color and blinking. It is just for the
case a character has to be transported and cannot be used directly. Any
use of escaping should be avoided when possible, you only do it if you
have to.


I would say that the introduction of the XEP clearly says that it IS
about allowing nice new characters.

--
Sergei Golovan


Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Sergei Golovan

On 6/27/07, Michal 'vorner' Vaner [EMAIL PROTECTED] wrote:

Hello

On Wed, Jun 27, 2007 at 01:11:03PM +0200, Norman Rasmussen wrote:
  On 6/27/07, Sergei Golovan [EMAIL PROTECTED] wrote:
 
  You're right. And the question is: How to escape it? Can escaping be
  done unambiguously?


  Yes, but only if you already know the split.

Is there a way the server part could contain @? I hope a domain name
can't contain it. I would take the last @ as the actual separator and
leave all the before as just part of the node (same as with email, where
you can have address like @@host.com, where the local name on host is
really @).


The last @ may be in a resource part.



Do you think there may be a problem with this approach?


Valig JIDs are always split into three parts unambiguously. As far as
I thought, XEP-0106 purpose is to allow invalid JIDs to be shown to a
user (hiding real complicated escaped JID). But it seems to fail in
this. So, let this XEP serve another goal - interoperability between
XMPP network and the others.

--
Sergei Golovan


Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Matthias Wimmer

Sergei Golovan schrieb:

I would say that the introduction of the XEP clearly says that it IS
about allowing nice new characters.


I don't read it that way. I read it:

They one to have O'Hara as their username in the account backend (e.g. 
the LDAP server) and they may for example log in to the website as 
O'Hara then. But with that username, their JID will then be 
[EMAIL PROTECTED]. And as long as you display a JID you will 
display [EMAIL PROTECTED]. But if you only present the username, 
than you may present o'hara again (but this username then does not 
contain the @example.com part).



Matthias


Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Matthias Wimmer

Matthias Wimmer schrieb:
They one to have O'Hara as their username in the account backend (e.g. 


Please read this as:

If one wants to have ...

(Don't know how I created They one to have.)


Matthias


Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Matthias Wimmer

Hi Sergei!

Sergei Golovan schrieb:

Then I would like to ask who should escape JIDs and when? I don't
think that users will read XEP and escape desired characters.


Well escaping will mostly be done by transports. Consider the case of 
the well known msn transport:
MSN has addresses of the form [EMAIL PROTECTED] as well. So the transport when 
it maps this address to a Jabber ID it has to do something with the @ 
sign in this address. Traditional transports did map it to the % 
character. While a transport using XEP-0106 would map it to: 
[EMAIL PROTECTED]


Clients will normally not unescape this address when displaying it. It 
would only be unescaped by the client, if this client would have a 
different interface for MSN messaging (a multi-IM like GUI hiding the 
details that all is routed over the Jabber network for example), where 
it will then just display the [EMAIL PROTECTED] again.


But no Jabber client always tried to display the JIDs generated by the 
msn transport as [EMAIL PROTECTED]@msn.example.com.



One possible question is: user's client during registration process.
And user will be surprised looking at his new brand escaped JID.


Why would a client do escaping during registration? It should just not 
allow the user to enter characters not allowed in the node part of a JID 
when asking it which account it wants to create.


Remember that this XEP is not made to allow new characters to be used in 
user names, but to define a possible way to map addresses, that cannot 
be mapped directly. I gave you one example with XML, another one is in 
URLs when you add parameter values to it (http GET request).


http://example.com/script.php?param=user%40domain

You would also not expect your web browser to display this unescaped in 
the address line. This escaping is just there to be able to transport 
the @ character in value of a request.


The same way XEP-0106 is not about allowing nice new characters and 
displaying them animated in high color and blinking. It is just for the 
case a character has to be transported and cannot be used directly. Any 
use of escaping should be avoided when possible, you only do it if you 
have to.



Matthias


Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Sergei Golovan

On 6/27/07, Matthias Wimmer [EMAIL PROTECTED] wrote:

Sergei Golovan schrieb:
 I would say that the introduction of the XEP clearly says that it IS
 about allowing nice new characters.

I don't read it that way. I read it:


And how should one read:

The escaped JID is unescaped only for presentation to a human user
(typically by an XMPP client)?

Probably the XEP needs some clarification. I think that your
interpretation is more reasonable than in the XEP text.

--
Sergei Golovan


Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Matthias Wimmer

Hi Sergei!

Sergei Golovan schrieb:

And how should one read:

The escaped JID is unescaped only for presentation to a human user
(typically by an XMPP client)?


As I explained in one of my last e-mails: someone might want to 
implement a Jabber client that has an interface like Pidgin but that 
does only XMPP serverside.


So the client knows that something arriving from 
[EMAIL PROTECTED] is a MSN messenger message. It opens a 
MSN style window and only presents [EMAIL PROTECTED] as the sender address. 
And it knows always when the user sends a message out of a MSN message 
window, it has to send back the message to the transport instead of to 
[EMAIL PROTECTED].



Matthias


Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Sergei Golovan

On 6/27/07, Matthias Wimmer [EMAIL PROTECTED] wrote:

Hi Sergei!

Sergei Golovan schrieb:
 And how should one read:

 The escaped JID is unescaped only for presentation to a human user
 (typically by an XMPP client)?

As I explained in one of my last e-mails: someone might want to
implement a Jabber client that has an interface like Pidgin but that
does only XMPP serverside.


In this case the client don't want to have unescaped full JID. It only
needs unescaped node. The XEP is perfectly suitable for this. But it
is full of examples of unescaped full JIDs (in fact bare JIDs). It is
confusing.

--
Sergei Golovan


Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Mridul Muralidharan

Sergei Golovan wrote:

On 6/27/07, Mridul Muralidharan [EMAIL PROTECTED] wrote:


It is not about visual representation.
xep 106 is about encoding pieces of the jid such that they are compliant
with xmpp requirements in a standard way.


Then I would like to ask who should escape JIDs and when? I don't
think that users will read XEP and escape desired characters.

One possible question is: user's client during registration process.
And user will be surprised looking at his new brand escaped JID.



Hi,

  There are deployments where uid's are standardized - like using email 
id. So the user id is [EMAIL PROTECTED], and the full jid would be 
[EMAIL PROTECTED]
The client would take in [EMAIL PROTECTED] as userid, imdomain as the xmpp 
domain and then construct the jid appropriately (using the xep specified 
encoding). At the server, it would retrieve the individual parts, 
unescape each and uniquely identify the uid to be used for that user in 
that xmpp domain (property store, authentication, etc).


I am just giving a possible usecase (albeit something which is supported 
by us for example) - you can come up with many others too.
In the above example, if the user wants to put his JID in his business 
card, he will need to specify [EMAIL PROTECTED] - since that 
is his xmpp jid to which he is accessible at (if imdomain is a federated 
server for example) - just like he would put [EMAIL PROTECTED] as his email.


Hope this clarifies and also gives one usecase of how escaping and 
unescaping are required.


Regards,
Mridul


Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Peter Saint-Andre
Sergei Golovan wrote:
 Hi!
 
 Could someone clarify how to escape the following JID (and to split it
 into node, server and resource)?
 
 [EMAIL PROTECTED]/[EMAIL PROTECTED]/resource

Why are you showing full JIDs to users? What is the use case for showing
this?

 I could do it in two ways:
 
 1) user
jabber.org
 [EMAIL PROTECTED]/resource
 
 2) user\40jabber.org\27user
jabber.org
   resource
 
 XEP-0106 doesn't give an exact way of escaping such a JID. And if 1)
 or 2) is preferrable then there's no way (or it's not easy) to send a
 message to another JID.

Use bare JIDs?



smime.p7s
Description: S/MIME Cryptographic Signature


Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Peter Saint-Andre
Sergei Golovan wrote:
 On 6/27/07, Matthias Wimmer [EMAIL PROTECTED] wrote:
 Hi Sergei!

 Ah okay ... it seems I start understanding what you are trying to do.
 You want to map a JID (or something like that) into another JID, e.g.
 for building the infamous Jabber-Jabber transport.
 
 Not exactly. I want to implement XEP-0106 in Tkabber and the idea was
 to show only unescaped JIDs to a user. But since different escaped
 (real) JIDs map to one escaped JID then it's impossible (user should
 definitely know who sent the message).
 
 My current yhought is the following: to show unescaped JID if and only
 if it can be escaped unambiguously.
 
 But this approach isn't good too (appending different resources we may
 break unescaping of any bare JID).
 
 So, probably I will not unescape / and @ in nodes. It should solve
 ambuguity.

Sure, try that out and see how it goes.

Peter

-- 
Peter Saint-Andre
XMPP Standards Foundation
http://www.xmpp.org/xsf/people/stpeter.shtml



smime.p7s
Description: S/MIME Cryptographic Signature


Re: [jdev] Escaping JID using XEP-0106

2007-06-27 Thread Peter Saint-Andre
Matthias Wimmer wrote:
 Matthias Wimmer schrieb:
 The resource is allowed to contain '@' as well as '/'. Everything behind
 the first '/' character in a JID is the resource.
 
 ... but this has nothing to do with XEP-0106 BTW.
 
 XEP-0106 is about mapping non-JID addresses in a JID. e.g. if you have a
 E-Mail address, that cannot map directly in a JID you will use XEP-0106.

Basically, yes. The idea for native XMPP addresses is that people might
want them to look the same as their email addresses. So if your email
address is d'[EMAIL PROTECTED] then you might want your JID to look
the same. But we can't do that natively in XMPP because single quote is
not allowed in a node identifier, so we need an escaping mechanism,
which is XEP-0106. So a JID of [EMAIL PROTECTED] would be
presented as d'[EMAIL PROTECTED] even in a pure XMPP system.

Peter

-- 
Peter Saint-Andre
XMPP Standards Foundation
http://www.xmpp.org/xsf/people/stpeter.shtml



smime.p7s
Description: S/MIME Cryptographic Signature