Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
ramtin #1
User title: RamTin
Member since Mar 2013 · 26 posts
Group memberships: Members
Show profile · Link to this post
Subject: Registration error
Hi alex,
first of all i saw and tried this thread>
http://forum.ag-software.net/thread/1063-Account-Registrat…

and doesn't work for m.

error message>
Users are not allowed to register accounts so quickly

here is my debug xml:

Write> <stream:stream to='imagap.ir' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>
Read> <stream:stream xmlns:stream="http://etherx.jabber.org/streams" from="imagap.ir" xml:lang="en" id="1426519648" version="1.0" >
Read> <stream:features xmlns:stream="http://etherx.jabber.org/streams"><starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls" /><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>SCRAM-SHA-1</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism></mechanisms><c xmlns="http://jabber.org/protocol/caps" node="http://www.process-one.net/en/ejabberd/" hash="sha-1" ver="TQ2JFyRoSa70h2G1bpgjzuXb2sU=" /><register xmlns="http://jabber.org/features/iq-register" /></stream:features>
Write> <iq id="agsXMPP_1" type="get" to="imagap.ir"><query xmlns="jabber:iq:register" /></iq>
Read> <iq xmlns="jabber:client" from="imagap.ir" type="result" id="agsXMPP_1"><query xmlns="jabber:iq:register"><instructions>You need a client that supports x:data and CAPTCHA to register</instructions><x xmlns="jabber:x:data" type="form"><field type="hidden" var="FORM_TYPE"><value>urn:xmpp:captcha</value></field><instructions>Choose a username and password to register with this server</instructions><field type="text-single" label="User" var="username"><required /></field><field type="text-private" label="Password" var="password"><required /></field><field type="fixed"><value>If you don't see the CAPTCHA image here, visit the web page.</value></field><field type="hidden" var="captchahidden"><value>workaround-for-psi</value></field><field type="text-single" label="CAPTCHA web page" var="url"><value>http://imagap.ir:5280/captcha/672663874/image</value></field><field type="hidden" var="from"><value>imagap.ir</value></field><field type="hidden" var="challenge"><value>672663874</value></field><field type="hidden" var="sid"><value>agsXMPP_1</value></field><field var="ocr" label="Enter the text you see"><required /><media xmlns="urn:xmpp:media-element"><uri type="image/png">cid:sha1+457496d6c6a81b88d6d60aea93dac90bbc0736df@bob.xmpp.org</uri></media></field></x><data xmlns="urn:xmpp:bob" type="image/png" max-age="0" cid="sha1+457496d6c6a81b88d6d60aea93dac90bbc0736df@bob.xmpp.org"></data></query></iq>
Write> <iq type="set" id="agsXMPP_2" to="imagap.ir"><query xmlns="jabber:iq:register"><instructions>You need a client that supports x:data and CAPTCHA to register</instructions><x xmlns="jabber:x:data" type="form"><field type="hidden" var="FORM_TYPE"><value>urn:xmpp:captcha</value></field><instructions>Choose a username and password to register with this server</instructions><field type="text-single" label="User" var="username"><required /></field><field type="text-private" label="Password" var="password"><required /></field><field type="fixed"><value>If you don't see the CAPTCHA image here, visit the web page.</value></field><field type="hidden" var="captchahidden"><value>workaround-for-psi</value></field><field type="text-single" label="CAPTCHA web page" var="url"><value>http://imagap.ir:5280/captcha/672663874/image</value></field><field type="hidden" var="from"><value>imagap.ir</value></field><field type="hidden" var="challenge"><value>672663874</value></field><field type="hidden" var="sid"><value>agsXMPP_1</value></field><field var="ocr" label="Enter the text you see"><required /><media xmlns="urn:xmpp:media-element"><uri type="image/png">cid:sha1+457496d6c6a81b88d6d60aea93dac90bbc0736df@bob.xmpp.org</uri></media></field></x><data xmlns="urn:xmpp:bob" type="image/png" max-age="0" cid="sha1+457496d6c6a81b88d6d60aea93dac90bbc0736df@bob.xmpp.org"></data><username>testid</username><password>testPS</password></query></iq>
Read> <iq xmlns="jabber:client" from="imagap.ir" type="error" id="agsXMPP_2"><query xmlns="jabber:iq:register"><instructions>You need a client that supports x:data and CAPTCHA to register</instructions><x xmlns="jabber:x:data" type="form"><field type="hidden" var="FORM_TYPE"><value>urn:xmpp:captcha</value></field><instructions>Choose a username and password to register with this server</instructions><field type="text-single" label="User" var="username"><required /></field><field type="text-private" label="Password" var="password"><required /></field><field type="fixed"><value>If you don't see the CAPTCHA image here, visit the web page.</value></field><field type="hidden" var="captchahidden"><value>workaround-for-psi</value></field><field type="text-single" label="CAPTCHA web page" var="url"><value>http://imagap.ir:5280/captcha/672663874/image</value></field><field type="hidden" var="from"><value>imagap.ir</value></field><field type="hidden" var="challenge"><value>672663874</value></field><field type="hidden" var="sid"><value>agsXMPP_1</value></field><field var="ocr" label="Enter the text you see"><required /><media xmlns="urn:xmpp:media-element"><uri type="image/png">cid:sha1+457496d6c6a81b88d6d60aea93dac90bbc0736df@bob.xmpp.org</uri></media></field></x><data xmlns="urn:xmpp:bob" cid="sha1+457496d6c6a81b88d6d60aea93dac90bbc0736df@bob.xmpp.org" max-age="0" type="image/png"></data><username>testid</username><password>testPS</password></query><error type="cancel" code="405"><not-allowed xmlns="urn:ietf:params:xml:ns:xmpp-stanzas" /></error></iq>
(hash code was very long so i removed all hash data)

this server has a Captcha for registration.
how can i type captcha then send information to server?
Avatar
Alex #2
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
You are using ols jabber style registration. But your server sends you an xdata form.
You have to register over xdata and submit all fields the server provides. One of them it the Url to the captcha.
If you search the forum you can find many xdata examples.

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