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

[ENG-5563] Merge upstream up to the point before dropping support for Ruby 2.7 #3

Merged
merged 101 commits into from
Jan 14, 2025

Conversation

LucasHFS
Copy link

@LucasHFS LucasHFS commented Jan 10, 2025

Relates to: ENG-5563

@LucasHFS LucasHFS self-assigned this Jan 10, 2025
@LucasHFS LucasHFS changed the title [ENG-5563] Merge upstream [ENG-5563] Merge upstream up to the point before dropping support for Ruby 2.7 Jan 10, 2025
Mikhail Doronin and others added 27 commits January 10, 2025 17:18
-Async function version is being generated only when inline_script is true.

-Fix element id
ID generated are structured like "g-recaptcha-response-data-#{action}"
Took me a bit to realize I needed two separate keys to do v3 -> v2 callback. Adding in site and secret_key to example to clarify that concept.
Also, adding a small note about which version is used in the rails setup example.
We can't use Recaptch.with_configuration here because it will set api_server_url
and verify_url back to what's returned by calling those methods on
Recaptcha.configuration when its default is actually nil, and those methods
never return nil.
grosser and others added 20 commits January 10, 2025 17:21
This commit allows the user to pass in the expected action as a symbol.

Previously we would compare the string action with the symbol action and
we'd think the action was invalid.
This solves problems which have been described in the [tracking issue](ambethia#427).

Closes ambethia#427.
… request with JSON

Certain reCAPTCHA-compatible services require that the server verification be submitted via POST rather than GET.

An example is Cloudflare Turnstile:
https://developers.cloudflare.com/turnstile/migration/migrating-from-recaptcha/#server-side-integration

That documentation calls out the requirement for the verification call be done via POST.

This PR adds the ability to supply options[:json] = true (defaults to false) to submit the data as POST with JSON body.
This was unused and may cause accessibility concerns if there is more than one recaptcha on the page due to multiple elements with the same id
@LucasHFS LucasHFS merged commit 7b0c267 into master Jan 14, 2025
0 of 7 checks passed
@LucasHFS LucasHFS deleted the merge-upstream branch January 14, 2025 18:36
@LucasHFS LucasHFS restored the merge-upstream branch January 14, 2025 18:37
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.