Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed req.params.index to req.params.id #2

Closed
wants to merge 1 commit into from

Conversation

kavuri
Copy link

@kavuri kavuri commented Jun 7, 2014

The angularjs frontend sends 'id' as the request parameter instead of 'index'.

The angularjs frontend sends 'id' as the request parameter instead of 'index'.
@BrunoBernardino
Copy link
Contributor

I have confirmed on angular, vanilla, and jquery front-end versions. They all send the index, not the id (although the number does match).

You can confirm in https://github.com/emotionLoop/visualCaptcha-frontend-core/blob/master/src/visualcaptcha/templates.js#L91 && https://github.com/emotionLoop/visualCaptcha-frontend-core/blob/master/src/visualcaptcha/core.js#L178 && https://github.com/emotionLoop/visualCaptcha-frontend-core/blob/master/src/visualcaptcha/core.js#L78

Even if you were right, this commit does not do anything about it, instead changes the name of the request parameter, which is currently set as app.get( '/image/:index', _getImage );.

Please let me know if you need any explanation or if I'm not understanding this well.

@kavuri
Copy link
Author

kavuri commented Jun 8, 2014

I deployed visual captcha in sails.js server and the request for route '/image' did not have an index parameter at all and no captcha images were returned (all 404 errors). After looking into the req argument, found that the 'index' is 'id' and after the change, am able to retrieve the images and visual captcha works. I do not know the internals, so I could be wrong in the actual, but the problem I reported is real

@BrunoBernardino
Copy link
Contributor

OK, but the issue is not there for simple express. I'll investigate sails
during the week.
On Jun 8, 2014 2:27 PM, "Sateesh Kavuri" [email protected] wrote:

I deployed visual captcha in sails.js server and the request for route
'/image' did not have an index parameter at all and no captcha images were
returned (all 404 errors). After looking into the req argument, found that
the 'index' is 'id' and after the change, am able to retrieve the images
and visual captcha works. I do not know the internals, so I could be wrong
in the actual, but the problem I reported is real


Reply to this email directly or view it on GitHub
#2 (comment)
.

@kavuri
Copy link
Author

kavuri commented Jun 8, 2014

If it helps, I have create a github repo with sailsjs: https://github.com/kavuri/sailsjs-visualcaptcha

@BrunoBernardino
Copy link
Contributor

I didn't have time to look into this (I also know it's not very urgent since you've fixed it yourself), and I will be traveling this week, so I can only promise I'll look into this before the end of the month and figure out if we need another version for sails or a simple conditional in the code.

@RayanJ973
Copy link

Hello everyone, can someone help me please? In fact, i'm trying to implement visual captcha for sails but i don't really understand the configuration that i have to put on. I tried more than one time but i don't really understand how to add it into my register form . Can someone give me a help please ? Thank you

@BrunoBernardino
Copy link
Contributor

Hi @RayanJ973 have you tried looking into @kavuri 's repo?

Additionally you should create another issue or send an email to [email protected] if you need to share some more sensitive information (like code or logs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants