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

reCaptcha: Add concept of Google reCaptcha field #55

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

greezybacon
Copy link
Contributor

Outstanding

  • The "red" theme at least does not render properly due to a stylesheet error in the client theme
    CSS

Screenshots

When installed and enabled, adds a new field type to the "Verification" fields category

screen shot 2014-12-30 at 12 03 56 pm

Plugin has a configurable reCaptcha theme

screen shot 2014-12-30 at 12 04 11 pm

Add it to the "Contact Information" form for new ticket and registration CAPTCHA support

screen shot 2014-12-30 at 12 06 28 pm

The included recaptcha-lib includes translations out-of-the box

screen shot 2014-12-30 at 12 06 44 pm

@protich
Copy link
Member

protich commented Apr 10, 2015

👍 Love the idea of disconnecting captcha from core osTicket.

I think the system should gracefully skip fields added by defunct plugins.

@ntozier
Copy link
Contributor

ntozier commented Apr 10, 2015

Fantastic!

@CelticWebSolutions
Copy link

CelticWebSolutions commented Nov 5, 2016

IS it still possible to use this with V1.10 ? I've copied the plugin folder over but it does not show up in form after I enable it.

I get the title and am able to add it to a form but the captcha doesn't show

Any help you could offer would be much appreciated.

@TheFallenWolf
Copy link

Same as CelticWebSolutions - is there any support for 1.10 (release) possible?
The normal captcha is just useless as it's no challenge for any bot.

@greezybacon
Copy link
Contributor Author

Ok, so I upgraded the code to remove the dependency on the third-party library. It uses the API 2.0 now. To use it, you'll need to enable the plugin, and configure it with your public/private key pair. You can register for one at https://www.google.com/recaptcha/intro/, use the "Get reCAPTCHA" link. After registering a site, you'll get the public key from the client-side integration information (called the sitekey), and you'll get the private key from the server-side integration (called the secret). Once configured, you should be ready to add it to the "Contact Information" form with a visibility of "For EndUsers Only".

@greezybacon
Copy link
Contributor Author

image

@TheFallenWolf
Copy link

TheFallenWolf commented Jan 6, 2017

Thanks so far!
Do I need to install the whole plugin package or is it enough if I take "field-recaptcha"?
I installed it, entered the keys and added it to the contact information with the variable name "captcha".

Now this happens:

captcha

I also can edit the settings (dark/light, sound/picture...). Any idea what went wrong?

** EDIT **
Line 103 of field.php, the "https" is missing:
'https://www.google.com/recaptcha/api.js?hl='

Works perfectly now!

@pberenyi
Copy link

Hi,
this works great on the end user facing pages, but is it possible to hide the field for the agents on the agent portal? (Meaning not to display the random string in the ticket details.)
Also if you don't check the checkbox and try to submit the form you get the error message that it is a mandatory field, but the reCAPTCHA is not displayed again, thus you can't submit the ticket, but have to restart.

@DerDanilo
Copy link

DerDanilo commented Mar 13, 2017

What is the status of the plugin? Could this please be put on the webpage if it works fine?
We have had several Spam issues with some setups and this Plugin is more then needed and should maybe be distributed on default together with the "storage-fs" plugin.

Please provide this package via .phar, maybe publish as beta if not stable/tested yet. If it works it ain't stupid. :)

Thanks!

Found a bug:

  • reCaptcha works fine when submitting on the first try (client site).
  • When there is a field error (missing info, wrong string etc.), the reCaptcha window disappears and the form has to be reset for the captcha to appear again.

grafik

  • In the ticket details the recaptcha data is visible, how to hide this?

grafik

@ntozier
Copy link
Contributor

ntozier commented Mar 13, 2017

@DerDanilo if you want this feature I would recommend that you install the plugin and see if it works. The author is rarely ever around anymore. So if people test it and it works, I will pressure the devs to add it to the webpage.

@DerDanilo
Copy link

I just did, it works so far, but as shown in the screenshots it gives the recaptcha in the ticket details (nobody needs them anymor after submit) and the error I descripted above.

The error should be easy to fix, it the code just needs to know to stay visible until successfully submited.
I'm no dev otherwise I'd do it. :)

@ntozier
Copy link
Contributor

ntozier commented Feb 27, 2018

@protich can this be merged with base yet? :)

@mjh2901
Copy link

mjh2901 commented Feb 27, 2018

I have this plugin running on my 1.10.1 setup, works fantastic, installed following the instructions above without a hitch. The current captcha in OSticket is completely ineffective, Please merge this into the base branch.

@theking81
Copy link

The plugin works great. The only issue is that the agents see the string of data with the submitted form. There has to be another way to hide the data from the agents.

@bstruik
Copy link

bstruik commented May 23, 2018

i dont understand how to install the php files? Can someone tell me where to download the phar file? Or how to install it?

@ntozier
Copy link
Contributor

ntozier commented May 23, 2018

This hasn't been released as a .phar file or it would be at osticket.com/download. You have to download the source, hyrdrate it, and then apply the changes in this pull if you want to use it.

See Installing and Building plugins at the base of this repo.
https://github.com/osTicket/osTicket-plugins

@gibbypip
Copy link

gibbypip commented Jun 7, 2018

Would there be any particular reason why this doesn't stop the user from signing up even if they don't submit the captcha? If there are other errors in the form (password, bad e-mail, etc.) it shows the "Captcha is required" as well as the other user or password errors.

However, if the rest of the form (Contact Information) is filled out correctly, it does not stop the user from submitting the form. I've checked and the settings on the field are correct: "For EndUsers Only, Required"

I can't find where there might be a setting that I'm missing.

@ianhaney
Copy link

I have installed this and it works, the only issue I can see is when select General Enquiry from the dropdown on a new ticket, it does not show but if then select report a problem from the dropdown it shows and then go back to general enquiry and it shows, the problem is it don't seem to show on default when selecting a topic from the dropdown

Has anyone had this issue? I am using osticket version 1.10.1

@DiscoveryOV
Copy link

Any idea if this is going to be implemented? Google Recaptcha support would be great.

@adpe
Copy link

adpe commented Jul 28, 2021

Hi @DerDanilo and @theking81

Just set the field configuration as

image

... and it will not be visible in the ticket details.

The other problem still exists, that the widget is not render again if the form validation fails.

Greets
Adrian

@JediKev
Copy link
Contributor

JediKev commented Jul 28, 2021

@adpe

This plugin was never merged nor officially released. Also, the last time it saw updates was circa 2017....so it's more than likely this no longer works and requires some updates.

Cheers.

@adpe
Copy link

adpe commented Jul 29, 2021

Hi @JediKev

I've now a working code, also when the form validation fails. By the way, we'll use this field configuration:

image

If you are interested to release this plugin officially, I'll provide a merge request. If not, I will not spend time on it.

Greets
Adrian

@Dav1dNL
Copy link

Dav1dNL commented Jul 29, 2021

@adpe @JediKev

I'm definitely interested in the working code or an official release of this plugin!

Greets,
David

@adpe
Copy link

adpe commented Sep 3, 2021

Hi @Dav1dNL

I've now made it public under https://github.com/ffhs/osticket-plugin_field_recaptcha.

Greets
Adrian

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.

None yet