About the flash hack

Hello!

I need to install sparkweb, which is programmed in flash *sigh*, as the client for an ejabberd server. I managed to solve the issue with the crossdomain.xml file thanks to a patch for apache, but now I'm facing another problem, since I receive a

"<stream:error><invalid-namespace xmlns='urn:ietf:params:xml:ns:xmpp-streams'/></stream:error>"
error at the beggining of the communication.

My guess is that it is due to the initial packet sent by the client. It looks like this:

<flash:stream to=\"server\" xmlns=\"jabber:client\" xmlns:flash=\"http://www.jabber.com/streams/flash\" version=\"1.0\" />

But at the end of the packet there's a \000. Is it possible that the error is due to this?
I took a look at the flash-hack patch that was released, but I checked my flash version and it is 10.0 r45, so I shouldn't need to use that patch...

Ok, first I tried to update

Ok, first I tried to update the patch for the latest ejabberd version, but since my knowledge of erlang is very limited I didn't succeed. However, when I downgraded ejabberd to 2.0.5 and applied the patch all seemed to work. How's it possible when I my flash version is newer than 8?

Anyway, I was wondering if it would be possible to update the patch for the 2.1.4 version, since the 2.0.5 has a known vulnerability and I wouldn't like to use it.

Patch ported. Now you test

xcu wrote:

I was wondering if it would be possible to update the patch for the 2.1.4 version

Yes, check https://support.process-one.net/browse/EJAB-599

I've ported it to ejabberd 2.1.4. I tested that patch with a normal client only. Let's hope it also works with a Flash client.

Tested, but...

Hello badlop, thank you so much for your quick answer!

However, I tested the patch with sparkweb and still I get the invalid-namespace error. I don't know if it's either because it's not taking out properly the final \000 of the packet or because it's having some problem to recognize the header and change it for the other one...

run autoconf; confi --enable-flash-hack

xcu wrote:

I tested the patch with sparkweb and still I get the invalid-namespace error.

Ensure you make the step 2 from http://www.ejabberd.im/flash-hack

xcu wrote:

I don't know if it's either because it's not taking out properly the final \000 of the packet or because it's having some problem to recognize the header and change it for the other one...

To know who is sending something incorrect (your client, or ejabberd), you can sniff the network traffic with wireshark, tcpdump or other tool.

Yes, I followed setp 2 as

Yes, I followed setp 2 as well!

This was the xml message sent to the server:

<?xml version=\"1.0\"?>
<flash:stream
to=\"server\"
xmlns=\"jabber:client\"
xmlns:flash=\"http://www.jabber.com/streams/flash\"
version=\"1.0\" />
\000

And this messages were the response from the server:

<?xml version='1.0'?>
<stream:stream
xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams'
id='2181408671'
from='server'
xml:lang='en'>
<stream:error>
<invalid-namespace
   xmlns='urn:ietf:params:xml:ns:xmpp-streams'/>
</stream:error>
</stream:stream>
[ ERROR: Closing an unopened tag ]

It is changing the header, but still it looks like there's something missing.

I have a same problem

I have same problem in codding .my stream bar is not running properly.plz tell me about my problem .I shell be very thankful to you for this kindness.loat of thanks .
My URS:www.alrehmanquranacadamy.com

Change one word in Makefile.in

Ah, there was a small error in the patch, it must say EFLAGS.

How to solve in your code:
1. Change one line of Makefile.in as described here:

--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -65,7 +65,7 @@ ifeq (@pam@, pam)
 endif

 ifeq (@flash_hack@, true)
-  ERLC_FLAGS+=-DENABLE_FLASH_HACK
+  EFLAGS+=-DENABLE_FLASH_HACK
   CPPFLAGS+=-DENABLE_FLASH_HACK
 endif

2. Run again ./configure --enable-flash-hack
3. Run: make clean
4. Run: make
5. Install ejabberd, start, and now it should work.

After this fix, I try:

$ telnet localhost 5222
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

<flash:stream to="localhost" xmlns="jabber:client" 
   xmlns:flash="http://www.jabber.com/streams/flash" 
   version="1.0" />\000

<?xml version='1.0'?>
<flash:stream xmlns='jabber:client'
              xmlns:stream='http://etherx.jabber.org/streams'
              id='2141287325'
              from='localhost'
              version='1.0'
              xml:lang='ru'></flash:stream>
    <stream:features>
      <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls' />
      <compression xmlns='http://jabber.org/features/compress'>
	<method>zlib</method>
      </compression>
      <mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
	<mechanism>PLAIN</mechanism>
	<mechanism>DIGEST-MD5</mechanism>
      </mechanisms>
      <c xmlns='http://jabber.org/protocol/caps'
	 hash='sha-1'
	 node='http://www.process-one.net/en/ejabberd/'
	 ver='LFuPQeigXLRLk3qXBKdFjjmMmkk=' />
      <register xmlns='http://jabber.org/features/iq-register' />
    </stream:features>
    </stream:stream>

Connection closed by foreign host.

Woohoo!

Yes, it's working now!

Thank you very much for your help, badlop :)

Syndicate content