From: tsaavik <ts...@he...> - 2005-08-30 20:41:22
|
Not sure where to go from here, hehe, need wiser eyes then mine. -------- Original Message -------- Subject: Re: Case in-senstive domain/node in jabber protocol Date: Tue, 30 Aug 2005 15:10:55 -0400 From: fac...@fa... (Nathan Walp) To: tsaavik <ts...@he...> References: <431...@he...> The XMPP RFC 3920 says that the node portion of a JID (the part before the @ symbol) should be mapped using STRINGPREP tables B.1 and B.2. Loosely translated, that means that the node is supposed to be case-insensitive. Since gaim can safely ignore case, it normalizes them to lowercase, so that a standard strcmp() can be used in the core, and not have to bother the prpl about particulars. Sony's servers are definitely off-spec if they're treating the room names case-sensitively. Unfortunately, there's not much I can do to fix your problem without serious structural changes in gaim core that aren't going to happen any time soon. As to your patch, if that actually works, I'm impressed. What you meant to do (which will still brain gaim's jabber support, should the other side decide to send things with 2 different cases), is replate g_utf8_strdown() with g_strdup(); But don't do that, it breaks things. You can file a bug if you want, but it won't get much attention any time soon. -Nathan On Tue, Aug 30, 2005 at 10:12:39AM -0700, tsaavik wrote: > Hello i found a possible problem with the jabber protocol for gaim and a > solution. > > Recently i tried to get onto sony.com's EQ2 jabber server but their > "room" names are mixed case. > When i tried to use the jabber protocol thru gaim it was sending all > lowercase. > > I looked around and found these 2 lines from /src/protocols/jabber/jutil.c > > node = jid->node ? g_utf8_strdown(jid->node, -1) : NULL; > domain = g_utf8_strdown(jid->domain, -1); > > Now i wasn't too sure which of these was the server name and which was > the room, i'm a jabber noob. > so i changed them both! > > I make this quick hack (leaving the g_utf8_strdown) since those are char > pointers and need memory allocated for them > My C was never very good, and its not improved much, i'm a shell/perl > kinda guy ;) > > node = jid->node ? g_utf8_strdown(jid->node, -1) : NULL; > node = jid->node ? strcpy(node, jid->node) : NULL; > domain = g_utf8_strdown(jid->domain, -1); > strcpy(domain, jid->domain); > > > Now i'm able to logon the server. > > I poured thru the 2 XMPP RFCs and can't find anything, i asked on #gaim > and everyone aggreed that the XML for jabber is > mixed case, but nobody knew if the node/domain was suppose to be or not. > I wouldn't be surprised if sony broke the spec. > However i've heard that trillian/exodus and a few other windows IM > clients work with sony's setup. > > Below this is a HOWTO i wrote up on the sony board, it has more details > i may have left out above :) > ------------------------------- > > How to get it working in gaim on linux in under 200 steps!! > > Download the gaim source (i used 1.50) > uncompress it: "tar xfz gaim-1.50.tar.gz" > go into the dir: "cd /gaim-1.5.0/src/protocols/jabber" > edit jutil.c: "vi jutil.c" > on next line after "node = jid->node ? g_utf8_strdown(jid->node, -1) : > NULL;" > insert a newline with: "node = jid->node ? strcpy(node, jid->node) : NULL;" > on next line after "domain = g_utf8_strdown(jid->domain, -1);" > insert a newline with: "strcpy(domain, jid->domain);" > > now go back to the toplevel of the gaim source: "cd ~/gaim-1.50 > compile it: "./configure && make" > become root: "su" > install it: "make install" > go into the plugins dir in the gaim source: "cd plugins" > Compile the raw plugin: "make raw.so" > copy it to your plugins dir, default is /usr/local/lib/gaim/: "cp raw.so > /usr/local/lib/gaim" > get outta root account: "exit" > > now start gaim: "/usr/local/bin/gaim" > > make a jabber account: > tools->accounts->add > protocol: jabber > screenname: WebClient > server: guildschat.station.sony.com > resource: gaim > password: The "content" of your sony.com ssid cookie (explained on next > line) > in firefox, edit->prefrences->privacy->cookies->view cookies > (site:sony cookiename:ssid "content" is your password) > save in gaim and logon! > > click help, debug (you get a debug window, leave it up, good for later) > > now goto tools->prefrences->plugins > enable raw plugin and hit close > change the toggle box in the new window to your jabber account > > now post the following to get a list of valid accounts, you have to do this > everytime, even if you know your account. Note the stuff in bold > has to be changed!! > > <iq type='get' id='id1'> > <query xmlns='soe:iq:character#query'> > <game>EQ2</game> > <server>*Yourserver*</server> > <guild>*Yourguild*</guild> > </query> > </iq> > > > okay, you should see all your alts in the debug window, now choose one > and paste this next block, remember the stuff in bold needs to be > changed to match your info > > <iq type='result' id='id2'> > <query xmlns='soe:iq:character#select'> > <character>EQ2.*Yourserver.Yourcharname*</character> > </query> > </iq> > > okay, your online! and you can recieve tells (trust me), now to get to > guild chat > click buddies->add chat > account: change to jabber > room is EQ2.*Server.Guildname* > server is: guildschat.station.sony.com > hit ok > > NOTE you MUST observe the CaPs for this stuff, sony's jabber is case > sensitive, this is the reason we had to edit the jutils.c > > Goodluck All!!! |