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

Integration of Google reCAPTCHA into DSpace Feedback Form #9866

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

VictorDuranEscire
Copy link

@VictorDuranEscire VictorDuranEscire commented Sep 30, 2024

Hi @tdonohue, I like to share this PR with you.

References

Description

Add rechaptcha's verification to feedback form

Instructions for Reviewers

API REST afected: 'api/tools/feedbacks'
URI URL: /info/feedback

Add rechaptcha verification to the comment form to avoid mass comment requests.

List of changes in this PR:

  • I have added a variable in dspace.cfg to configure reCaptcha verification in the feedback form, the variable is called 'feedback.verification.enabled'.
  • I added a variable in rest.cfg to expose the variable for the REST API: '/config/properties/' for use in the dspace-angular project.
  • I modified the FeedbackRestRepository class to check the recaptcha token according to the configuration of this part.
  • I modified the CaptchaService to add the feedback token.

To test:

First configure the google recaptcha settings:

  • google.recaptcha.key.site.
  • google.recaptcha.key.secret
  • google.recaptcha.version
  • google.recaptcha.mode

Secondly configure the options to receive the email sent in the comment form:

  • mail.server
  • mail.server.username
  • mail.server.password
  • mail.server.port
  • feedback.recipient (the email to receive the feedback)
  • mail.extraproperties (just uncomment the configuration)

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & integration tests). Exceptions may be made if previously agreed upon.
  • My PR passes Checkstyle validation based on the Code Style Guide.
  • My PR includes Javadoc for all new (or modified) public methods and classes. It also includes Javadoc for large or complex private methods.
  • My PR passes all tests and includes new/updated Unit or Integration Tests based on the Code Testing Guide.
  • My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
  • If my PR includes new libraries/dependencies (in any pom.xml), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR modifies REST API endpoints, I've opened a separate REST Contract PR related to this change.
  • If my PR includes new configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🙋 Needs Reviewers Assigned
Development

Successfully merging this pull request may close these issues.

Integration of Google reCAPTCHA into DSpace Feedback Form
3 participants