Code Monkey home page Code Monkey logo

recaptcha-asp-net's People

Contributors

agomezp7 avatar henriqb avatar saiyan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

recaptcha-asp-net's Issues

Current Version doesn't work with NewtonSoft.JSON 12

After upgrading the NewtonSoft.Json to version 12 in one of my projects the recaptcha package stopped working. Apparently it enforces the use of NewtonSoft.Json 9?

System.IO.FileLoadException: 'Could not load file or assembly "Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Ausnahme von HRESULT: 0x80131040)'

dependency on TLS 1.0/1?

I have an application using this library to do recaptcha verification, which works fine when running on a server where TLS 1.0, 1.1, and 1.2 are all enabled. However when I run the app on a server on which only TLS 1.2 is enabled the verification step fails with a WebException inside this library.

My question: is there any chance that this component has some kind of hard dependency on TLS 1.0/1? If so, I cannot use it in my target environment. All my searches on this error point to a TLS rejection.

Here's the stack trace:
WebException exception-message="The underlying connection was closed: An unexpected error occurred on a receive."
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at hbehr.recaptcha.WebCommunication.GoogleWebPost.CreatePostWebRequest(String postData, WebProxy proxy)
at hbehr.recaptcha.WebCommunication.GoogleWebPost.PostUserAnswer(String response, String secretKey, WebProxy proxy)
at hbehr.recaptcha.ReCaptchaObject.ValidateResponse(IReChaptaWebInterface webInterface, String response, WebProxy proxy)

Specifying language explicitly does not work

Hello,
I need help with localization.
I am trying to show the reCaptcha in German with the following code:

image

reCaptcha is configured as follows:

image

But it still is shown in English:

image

What am I doing wrong?

Thank you!

validateCaptcha Exception

Hi
Thank you so much for putting this code together. Can you provide a bit more detail on how to deal with the exception? I just need my users to click the radio button. I really don't need them to put in any information. But due to my lack of coding experience, I don't know where to go with that exception. I think you just have it there for folks who want to ask the user some question like: "what is 2 + 5", or what is your email address or something. I guess I can just delete the following:
bool validCaptcha = hbehr.recaptcha.ReCaptcha.ValidateCaptcha(userResponse); if (validCaptcha) { return View(); } else { // Bot Attack, non validated ! return RedirectToAction("YouAreARobot", "Index"); }

Issue in auto mode with hebrew

I encounter a nasty issue with a page in Hebrew.
I use 'auto' mode, and that works fine for English, French and Dutch.
For Hebrew, the package fails with a nasty stack exception.
My first thoughts were this has to do with the right to left rendering, but in fact this is due to the auto language detection that fails because the Google recaptcha code for Hebrew is 'iw' and not 'he' like what is returned by the CultureInfo.CurrentUICulture (= "he").

Extract from the code :
public static string GetLanguage(this ReCaptchaLanguage language) { if (language == ReCaptchaLanguage.Auto) { var newLanguage = GetLanguageByCulture(CultureInfo.CurrentUICulture); return GetLanguage(newLanguage.GetValueOrDefault()); } var attribute = language.GetType().GetMember(language.ToString()).Select(m => m.GetCustomAttribute<LanguageAttribute>()).FirstOrDefault() ?? new LanguageAttribute(string.Empty); return attribute.Value; }

I don't know why google folks invented that strange 'iw' code
and i don't know if there are more languages for which the auto-detection fails because the google code is different from the value returned by the culture.

For now i have it fixed by choosing and mapping the language in my page :
@hbehr.recaptcha.ReCaptcha.GetCaptcha(@hbehr.recaptcha.ReCaptchaLanguage.Hebrew);

This works and correctly gives the hebrew captcha.

Image validation

Dear,

We implemented this easy to use library but we noticed an issue when applied for a certain customer of ours. Most of the time, a captcha appears where you have to check a box saying "I'm not a robot" and in that case, everything works fine... Only, from time to time, a captcha appears where you have to validate an image and as a result, the captcha could not be validated.

There is no such mention of this option so my question is, is there a possibility to support image validation? Or disable this option so it always results in the checkbox? Or is there a possibility within the Google Recaptcha website to do something about it?

Kind regards,
Kevin Cocquyt

WebForms

Can this be implemented in WebForms? Not MVC or ASP Pages. For example I tried changing the client side script of
@ReCaptcha.GetCaptcha()
to
<% ReCaptcha.GetCaptcha(); %>
but no control is rendered.

Changelog

Hi, great package!

For me to update this package for our projects I need to know what changed. Right now that is not easy, because there is no changelog, no release (or one really old) or no tags.

Would it be possible to define some changelog, or at least work with releases, so I and my team knows what changed between versions. Thanks.

Theme Option

Hi is possible to pass in a theme option, so it will be possible to render the recaptcha in the dark format

Support for the returned hostname from the siteverify

I have many sites that use the reCaptcha and near the limit of 25 so I disabled the option for site verification in the Google settings. It is recommended that I do my own verification when doing this by verifying the hostname returned from the call to Google's siteverify which is done in ReCaptcha.ValidateCaptcha().

Perhaps this can be added as an option parameter passing the current hostname and if it does not match, fail the captcha.

Lower/remove newtonsoft.json requirement

Hi,
I'm wanting to add this to an old project, but because of the dependency chain starting at newtonsoft.json everything wants to upgrade

Is there a practical reason there could not be lower minimum version for newtonsoft.json?
(in my case 6.0.6 or less would be good)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.