Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Protects call tool with recaptcha #1502

Merged
merged 2 commits into from Sep 12, 2019
Merged

Conversation

osahyoun
Copy link
Member

No description provided.

@osahyoun osahyoun added the WIP label Sep 11, 2019
@@ -4,12 +4,23 @@ class Api::CallsController < ApplicationController
skip_before_action :verify_authenticity_token, raise: false

def create
service = CallCreator.new(call_params, tracking_params)
success = verify_recaptcha(action: params[:recaptcha_action], minimum_score: 0.5)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps having the recaptcha gem now makes app/services/recaptcha3.rb redundant?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm proposing it as an alternative to our own implementation - it would mean less code for us to maintain.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@osahyoun @eyko
Code what we have now is very simple. just 75 lines of code only.

Second, we need bit customisation as well.
We need to log the response for tracking the score as we have no way for that so far.

Third, we need to raise exception especially to Raven / slack when score is less than 0.5 for quickly monitoring the failed transaction with score

For these reasons I like existing recaptcha3 itself.

We shall have both for now.

@osahyoun osahyoun removed the WIP label Sep 11, 2019
@osahyoun osahyoun changed the title [WIP] Protects call tool with recaptcha Protects call tool with recaptcha Sep 11, 2019
@osahyoun
Copy link
Member Author

@shivashankar-f22labs care to have a look before I merge?

@osahyoun osahyoun merged commit 1d1d82c into development Sep 12, 2019
@osahyoun osahyoun deleted the feature.call_tool_recapt branch September 12, 2019 10:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants