Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
ziv #1
Member since Aug 2010 · 7 posts · Location: Australia
Group memberships: Members
Show profile · Link to this post
Subject: problem in registering account
hi all,
I using examble miniclient ,
when check the checkbox: register account,
program stop and nothing happend
I follow in the code ,
problem here :
in XmppClientConnection class ::
public override void StreamParserOnStreamStart(object sender, Node e) {
                base.StreamParserOnStreamStart(this, e);
                 m_StreamStarted = true;
                 protocol.Stream st = (protocol.Stream)e;
                if (st == null)
                return;
               // Read the server language string
               m_ServerLanguage = st.Language;              
               // Auth stuff
                 if (!RegisterAccount)
            {
                if (this.StreamVersion != null && this.StreamVersion.StartsWith("1."))
                {
                    if (!Authenticated)
                    {
                        // we assume server supports SASL here, because it advertised a StreamVersion 1.X
                        // and wait for the stream features and initialize the SASL Handler
                        InitSaslHandler();                       
                    }               
                }
                else
                {
                    // old auth stuff
                    RequestLoginInfo();
                }
            }
            else
            {
                // Register on "old" jabber servers without stream features
                if (this.StreamVersion == null)
                    GetRegistrationFields(null);
                [execution comming to here and nothing to do ??]

               
           
                      }
       
    }

socket Debug



SEND: <stream:stream to='thiessen.org' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>

RECV: <?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams'
id='bc358980-a045-45f4-81c8-813289bd2c29' from='thiessen.org' version='1.0' xml:lang='en'><stream:features><compression xmlns='http://jabber.org/features/compress'><method>zlib</method></compression><starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'><required/></starttls><c hash='sha-1' ver='QhHbXeJz7/ktA9/GF6mqMSqgFfE=' node='http://prosody.im' xmlns='http://jabber.org/protocol/caps'/></stream:features>

SEND: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />

RECV: <proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>
This post was edited 2 times, last on 2010-10-10, 00:50 by ziv.
Avatar
Alex #2
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
according to your log the programs hangs at TLS negotiation. This is not related with registering an account. And the server does not offer the registration feature, which means account creation is disabled on the server. It offers only compression and TLS in your log.

Alex
Avatar
ziv #3
Member since Aug 2010 · 7 posts · Location: Australia
Group memberships: Members
Show profile · Link to this post
Quote by Alex:
according to your log the programs hangs at TLS negotiation. This is not related with registering an account. And the server does not offer the registration feature, which means account creation is disabled on the server. It offers only compression and TLS in your log.

Alex

ok I were Think the server does not support registration ,
But I used other client program,and I can register new account on this server (thiessen.org)?

please give me server support registeration feature ?
This post was edited on 2010-10-10, 16:16 by ziv.
Avatar
Alex #4
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
there are clients which try to register accounts even the server does not advertise the registration features. But this is not the idea of stream features. When a server allows registration is MUST advertise this in the stream features. If it doesn't I assume registration is not enabled on this server.

Alex
Avatar
ziv #5
Member since Aug 2010 · 7 posts · Location: Australia
Group memberships: Members
Show profile · Link to this post
Quote by Alex:
there are clients which try to register accounts even the server does not advertise the registration features. But this is not the idea of stream features. When a server allows registration is MUST advertise this in the stream features. If it doesn't I assume registration is not enabled on this server.

Alex

I try a lot of servers ,all does not support registration feature ?
anyway if the client can register Account this mean server support registration although it does not advertise registration feature,right ?,
how I can register account even the server does not advertise the registration features ?.

Thanks Alex .
Avatar
Alex #6
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by ziv:
I try a lot of servers ,all does not support registration feature ?
when a server supports registration is must advertise the registration stream feature.
  1. <stream:features>
  2.    ...
  3.    <register xmlns='http://jabber.org/features/iq-register'/>
  4.    ...
  5. </stream:features>
see also:
http://xmpp.org/extensions/xep-0077.html#streamfeature

Quote by ziv:
I try a lot of servers ,all does not support registration feature ?
many servers have in band registration disabled because its insecure and opens the doors for spammers. They use web registration with captchas and confirmation emails instead to verify identities.

Quote by ziv:
anyway if the client can register Account this mean server support registration although it does not advertise registration feature,right ?,
how I can register account even the server does not advertise the registration features ?.
you can't without modifications to the agsXMPP sources.

Alex
Avatar
ziv #7
Member since Aug 2010 · 7 posts · Location: Australia
Group memberships: Members
Show profile · Link to this post
Quote by Alex:
you can't without modifications to the agsXMPP sources.

Alex
`
I want to change In the agsXMPP sources ,
But I dont have Idea ,,
If you can Help Me Please ,,,

Thanks Alex ,,,
Avatar
Alex #8
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
in XmppClientConnection line 1440:

  1. else if (m_RegisterAccount)
  2. {
  3.     // Do registration after TLS when possible
  4.     if (f.SupportsRegistration)
  5.         GetRegistrationFields(e);
  6.     else
  7.     {
  8.         // registration is not enabled on this server                       
  9.         FireOnError(this, new RegisterException("Registration is not allowed on this server"));
  10.         Close();
  11.         // Close the stream
  12.     }
  13. }

change to:
  1. else if (m_RegisterAccount)
  2. {
  3.     GetRegistrationFields(e);   
  4. }

but this change violates against the XMPP protocol and makes no sense.

Alex
Avatar
ziv #9
Member since Aug 2010 · 7 posts · Location: Australia
Group memberships: Members
Show profile · Link to this post
Thanks Alex,,
after Change happends this error

RECV ::<iq id='1001' type='result'><query xmlns='jabber:iq:register'>
<instructions>Choose a username and password for use with this service.</instructions><username/>
<password/></query></iq>


SEND: <iq type='set' id='1002'><query xmlns='jabber:iq:register'><password>zxczxc</password><username>ziv</username></query></iq>

RECV:<iq id='agsXMPP_2' type='error' from='thiessen.org'><error type='wait'><not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
</error></iq>
Avatar
Alex #10
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Please post your complete log. Snippets from this log are not from agsXMPP because agsXMPP creates different packet ids.

Alex
Avatar
ziv #11
Member since Aug 2010 · 7 posts · Location: Australia
Group memberships: Members
Show profile · Link to this post
SEND: <stream:stream to='thiessen.org' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>

RECV: <?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='93807f2b-ba78-4ad9-ac5a-12b4c8947288' from='thiessen.org' version='1.0' xml:lang='en'><stream:features><compression xmlns='http://jabber.org/features/compress'>
<method>zlib</method></compression>
<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'><required/></starttls>
<c hash='sha-1' ver='QhHbXeJz7/ktA9/GF6mqMSqgFfE=' node='http://prosody.im' xmlns='http://jabber.org/protocol/caps'/>
</stream:features>

SEND: <starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" />

RECV: <proceed xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>

SEND: <stream:stream to='thiessen.org' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>

RECV: <?xml version='1.0'?><stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='7c8344b2-ae2b-4a4e-9c92-9e03dba4e86a' from='thiessen.org' version='1.0' xml:lang='en'><stream:features>
<mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>SCRAM-SHA-1</mechanism>
<mechanism>PLAIN</mechanism></mechanisms>
<compression xmlns='http://jabber.org/features/compress'><method>zlib</method></compression><auth xmlns='http://jabber.org/features/iq-auth'/>
<c hash='sha-1' ver='QhHbXeJz7/ktA9/GF6mqMSqgFfE=' node='http://prosody.im' xmlns='http://jabber.org/protocol/caps'/></stream:features>

SEND: <iq id="agsXMPP_1" type="get" to="thiessen.org"><query xmlns="jabber:iq:register" /></iq>

RECV: <iq id='agsXMPP_1' type='result' from='thiessen.org'><query xmlns='jabber:iq:register'><instructions>Choose a username and password for use with this service.</instructions><username/><password/></query></iq>

SEND: <iq type="set" id="agsXMPP_2" to="thiessen.org"><query xmlns="jabber:iq:register"><username>ziv212</username><password>zxczxc</password></query></iq>

RECV: <iq id='agsXMPP_2' type='error' from='thiessen.org'><error type='wait'><not-acceptable xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>


I Search In  XEP-0077: In-Band Registration ,,
and in XEP-0086: Error Condition Mappings ,
No Information about this error .
Avatar
Alex #12
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
yes this is a strange error. You should ask the Prosody developers or the server admin about it. What you code does looks correct here to me.

Alex
Avatar
ziv #13
Member since Aug 2010 · 7 posts · Location: Australia
Group memberships: Members
Show profile · Link to this post
Quote by Alex:
yes this is a strange error. You should ask the Prosody developers or the server admin about it. What you code does looks correct here to me.

Alex

Now ,, I know cause of the problem,
Servers do not allow that record more than one new Account from the same IP sequentially ,,
(I have bug in My program it was create account then hangs,
therefore it return <error type='wait'> on next execution)

when finish I will post the change In The Code,,
really ,,,, Thanks Alex..
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS