Erlang/OTP Forums

Author Message

<  Ejabberd mailing list  ~  user registration via HTTP

Guest
Posted: Mon Jan 11, 2010 6:11 am Reply with quote
Guest
Decided to try mod_register_web. It's failing thus (man i can't get a break here):

...
exception error: einval
in function open_port/2
called as open_port({spawn," 213599"},[stream,eof,binary])
in call from ejabberd_captcha:cmd/1
in call from ejabberd_captcha:create_image/1
...


On Mon, Jan 4, 2010 at 11:37 AM, Liam <ejabberd@networkimprov.net (ejabberd@networkimprov.net)> wrote:
Quote:
Can I restrict in-band registration to a single registrar account which the client must log into before creating a new user?

And hey, Isn't web-based user sign-up really common? Why no HTTP interface to this in the main distribution?


On Mon, Dec 21, 2009 at 8:39 PM, Liam <ejabberd@networkimprov.net (ejabberd@networkimprov.net)> wrote:


Quote:
I need to let new users register ejabberd accounts via the browser-based xmpp client I'm coding.

Some constraints:

I can't use PHP (etc) to talk to ejabberd, as there is no server-side to my app beyond ejabberd; it's 100% client-side javascript.

I don't wish to allow in-band registration, as I only want users of my browser app to have access to ejabberd.

Thanks!

Liam






Post received from mailinglist
Guest
Posted: Mon Jan 11, 2010 6:11 pm Reply with quote
Guest
2010/1/11 Liam <ejabberd@networkimprov.net>:
> Decided to try mod_register_web. It's failing thus (man i can't get a break
> here):
>
> ...
> exception error: einval
> in function open_port/2
> called as open_port({spawn," 213599"},[stream,eof,binary])
> in call from ejabberd_captcha:cmd/1
> in call from ejabberd_captcha:create_image/1
> ...

Ah, mod_register_web shows a CAPTCHA when registering an account,
but that isn't mentioned in its README. I'll a paragraph like this:

> This module shows a CAPTCHA image in the page to register a new account.
> So, you must also configure the options captcha_cmd and captcha_host.
> See the ejabberd Guide for more information about those options.

See:
http://www.process-one.net/en/ejabberd/guide_en#captcha


Also, when the options are not configured, you probably get that
strange einval error message. I'll improve ejabberd to throw an error
message like this:

=ERROR REPORT==== 11-Jan-2010::19:02:19 ===
C(<0.494.0>:ejabberd_captcha:331) : The option captcha_cmd is not
configured, but some module wants to use the CAPTCHA feature.

=CRASH REPORT==== 11-Jan-2010::19:02:19 ===
crasher:
initial call: ejabberd_http:init/2
pid: <0.494.0>
registered_name: []
exception throw: {error,option_not_configured_captcha_cmd}
in function ejabberd_captcha:get_prog_name/0
in call from ejabberd_captcha:create_image/1


Summary: can you check you have captcha_cmd configured,
and confirm that was the problem behind your error message?


---
Badlop
ProcessOne
_______________________________________________
ejabberd mailing list
ejabberd@jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Post received from mailinglist
Guest
Posted: Mon Jan 11, 2010 7:21 pm Reply with quote
Guest
Can I disable the use of captcha in mod_register_web? I set captcha_cmd to "", but the same failure occurs...


On Sun, Jan 10, 2010 at 10:11 PM, Liam <ejabberd@networkimprov.net (ejabberd@networkimprov.net)> wrote:
Quote:
Decided to try mod_register_web. It's failing thus (man i can't get a break here):

...
exception error: einval
in function open_port/2
called as open_port({spawn," 213599"},[stream,eof,binary])
in call from ejabberd_captcha:cmd/1
in call from ejabberd_captcha:create_image/1
...



On Mon, Jan 4, 2010 at 11:37 AM, Liam <ejabberd@networkimprov.net (ejabberd@networkimprov.net)> wrote:
Quote:
Can I restrict in-band registration to a single registrar account which the client must log into before creating a new user?

And hey, Isn't web-based user sign-up really common? Why no HTTP interface to this in the main distribution?


On Mon, Dec 21, 2009 at 8:39 PM, Liam <ejabberd@networkimprov.net (ejabberd@networkimprov.net)> wrote:


Quote:
I need to let new users register ejabberd accounts via the browser-based xmpp client I'm coding.

Some constraints:

I can't use PHP (etc) to talk to ejabberd, as there is no server-side to my app beyond ejabberd; it's 100% client-side javascript.

I don't wish to allow in-band registration, as I only want users of my browser app to have access to ejabberd.

Thanks!

Liam










Post received from mailinglist
Guest
Posted: Mon Jan 11, 2010 9:55 pm Reply with quote
Guest
I intend to provide the reg form and post it with XHR, so all i need is to disable the captcha check below. However I'm not an erlang programmer -- suggestions?


form_new_post(Q, Host) ->
Guest
Posted: Mon Jan 11, 2010 10:09 pm Reply with quote
Guest
What revision of mod_register_web are you using? Revision 1034 on
process-one has no captcha check so maybe that will work for you?

https://forge.process-one.net/browse/ejabberd-modules/mod_register_web/branches/ejabberd-2.0.x/src/mod_register_web.erl?r=HEAD


Thanks,
Sylvain



On Mon, Jan 11, 2010 at 1:55 PM, Liam <ejabberd@networkimprov.net> wrote:
> I intend to provide the reg form and post it with XHR, so all i need is to
> disable the captcha check below. However I'm not an erlang programmer --
> suggestions?
>
>
> form_new_post(Q, Host) ->
>
Guest
Posted: Mon Jan 11, 2010 10:26 pm Reply with quote
Guest
2010/1/11 Liam <ejabberd@networkimprov.net>:
> I intend to provide the reg form and post it with XHR, so all i need is to
> disable the captcha check below.

Contrary to what I planned before, it makes more sense to disable
CAPTCHA support in mod_register_web when it isn't configured.

So, following your idea, I've implemented detection of the configuration.

The updated README says:
> This module supports CAPTCHA image to register a new account.
> To enable this feature, configure the options captcha_cmd and captcha_host.
> See the ejabberd Guide for more information about those options.

Update the module from SVN, compile and try. No need to configure
captcha anymore.


---
Badlop
ProcessOne
_______________________________________________
ejabberd mailing list
ejabberd@jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Post received from mailinglist
Guest
Posted: Mon Jan 11, 2010 10:36 pm Reply with quote
Guest
The new code still calls this if the passwords don't match:

ejabberd_captcha:check_captcha(Id, Key), %% This deletes the captcha


On Mon, Jan 11, 2010 at 11:21 AM, Liam <ejabberd@networkimprov.net (ejabberd@networkimprov.net)> wrote:
Quote:
Can I disable the use of captcha in mod_register_web? I set captcha_cmd to "", but the same failure occurs...



On Sun, Jan 10, 2010 at 10:11 PM, Liam <ejabberd@networkimprov.net (ejabberd@networkimprov.net)> wrote:
Quote:
Decided to try mod_register_web. It's failing thus (man i can't get a break here):

...
exception error: einval
in function open_port/2
called as open_port({spawn," 213599"},[stream,eof,binary])
in call from ejabberd_captcha:cmd/1
in call from ejabberd_captcha:create_image/1
...



On Mon, Jan 4, 2010 at 11:37 AM, Liam <ejabberd@networkimprov.net (ejabberd@networkimprov.net)> wrote:
Quote:
Can I restrict in-band registration to a single registrar account which the client must log into before creating a new user?

And hey, Isn't web-based user sign-up really common? Why no HTTP interface to this in the main distribution?


On Mon, Dec 21, 2009 at 8:39 PM, Liam <ejabberd@networkimprov.net (ejabberd@networkimprov.net)> wrote:


Quote:
I need to let new users register ejabberd accounts via the browser-based xmpp client I'm coding.

Some constraints:

I can't use PHP (etc) to talk to ejabberd, as there is no server-side to my app beyond ejabberd; it's 100% client-side javascript.

I don't wish to allow in-band registration, as I only want users of my browser app to have access to ejabberd.

Thanks!

Liam














Post received from mailinglist
Guest
Posted: Tue Jan 12, 2010 8:15 pm Reply with quote
Guest
Appears to be fixed now...

I really encourage process one to include mod_register_web in the ejabberd distributions. It's lightweight, and allows both end-user and HTTP IPC for user reg. It's waaaay easier than configuring ejabberd_xmlrpc!


On Mon, Jan 11, 2010 at 2:36 PM, Liam <ejabberd@networkimprov.net (ejabberd@networkimprov.net)> wrote:
Quote:
The new code still calls this if the passwords don't match:

ejabberd_captcha:check_captcha(Id, Key), %% This deletes the captcha




On Mon, Jan 11, 2010 at 11:21 AM, Liam <ejabberd@networkimprov.net (ejabberd@networkimprov.net)> wrote:
Quote:
Can I disable the use of captcha in mod_register_web? I set captcha_cmd to "", but the same failure occurs...



On Sun, Jan 10, 2010 at 10:11 PM, Liam <ejabberd@networkimprov.net (ejabberd@networkimprov.net)> wrote:
Quote:
Decided to try mod_register_web. It's failing thus (man i can't get a break here):

...
exception error: einval
in function open_port/2
called as open_port({spawn," 213599"},[stream,eof,binary])
in call from ejabberd_captcha:cmd/1
in call from ejabberd_captcha:create_image/1
...



On Mon, Jan 4, 2010 at 11:37 AM, Liam <ejabberd@networkimprov.net (ejabberd@networkimprov.net)> wrote:
Quote:
Can I restrict in-band registration to a single registrar account which the client must log into before creating a new user?

And hey, Isn't web-based user sign-up really common? Why no HTTP interface to this in the main distribution?


On Mon, Dec 21, 2009 at 8:39 PM, Liam <ejabberd@networkimprov.net (ejabberd@networkimprov.net)> wrote:


Quote:
I need to let new users register ejabberd accounts via the browser-based xmpp client I'm coding.

Some constraints:

I can't use PHP (etc) to talk to ejabberd, as there is no server-side to my app beyond ejabberd; it's 100% client-side javascript.

I don't wish to allow in-band registration, as I only want users of my browser app to have access to ejabberd.

Thanks!

Liam


















Post received from mailinglist
wuji
Posted: Wed Aug 15, 2012 7:13 am Reply with quote
User Joined: 10 Aug 2012 Posts: 654
her business and she says she nearly lost her kids.Both kids.Both [h3]cheap Ralph Lauren[/h3] kids.Both women are now clean and they have this simple
for any mom considering taking Adderall, "don't.""It's pretty addictive," said said cheap replica *beep* said Degree. "It can happen to anybody."George Zimmerman's Story 'Marginally
With Life Threatening Attack: CopLead Investigator Reassigned to Midnight Shift Shift cheap designer *beep* Shift on PatrolBy MATT GUTMAN and AARON KATERSKYSANFORD, Fla., June
2012 The lead homicide investigator in the shooting death of of [h3]cheap Ralph Lauren[/h3] of Trayvon Martin voiced strong skepticism of George Zimmerman's account
the shooting, describing Zimmerman's injuries as "marginally consistent with a a cheap Ralph Lauren Polo a life threatening violent encounter," according to documents released today
View user's profile Send private message
wuji
Posted: Mon Sep 17, 2012 6:53 am Reply with quote
User Joined: 10 Aug 2012 Posts: 654
Romney's "first day" timeframe.Now, repeal has re-emerged as a top top cheap replica *beep* top campaign issue for congressional Republicans, much like the 2010
elections that swept Rep John. Boehner into the speaker's chair."It chair."It [h2]cheap polo ralph lauren[/h2] chair."It becomes a huge issue going forward to the election
November," Rep. Steve King, R-Iowa, told ABC on the steps steps buy real jordans steps of the court immediately after the decision was announced.
Obama has had this around his neck for two and and authentic jordans and a half years. It will become an albatross around
neck of Barack Obama walking into November."Asked why it is is knockoff designer *beep* is necessary for the House to act again on repeal,
when there are not enough votes in the Senate to to [h4]imitation designer *beep*[/h4] to repeal it, Boehner also said the Supreme Court's ruling
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 2 of 2
Goto page Previous  1, 2
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum