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 and ORCID button on user registration form prevent form submission #10317

Open
ewhanson opened this issue Aug 14, 2024 · 3 comments
Open
Assignees
Labels
Bug:1:Low A bug that does not have a severe consequence or affects a small number of users. Community:1:Common Any issue that is commonly requested by the community.
Milestone

Comments

@ewhanson
Copy link
Collaborator

Describe the bug
In OJS 3.3, the connect ORCID button on the user registration form was interacting with the Recaptcha functionality to prevent the ability as noted here: pkp/orcidProfile#294 (comment). The root cause of this should be identified so the ORCID connect button functionality on the user registration page can be restored.

The working assumption is the root of this issue is the ORCID button, after it connects to ORCID via OAuth, it does something on the page that invalidates the current Recaptcha "round." It may be a items in the form changing, those items being changed by an external page via JS, or something else entirely. More investigation needed.

To Reproduce
Steps to reproduce the behavior:

  1. In the OrcidProfilePlugin, restore the following lines in OrcidProfilePlugin.inc.php (for stable-3_3_0):
diff --git a/OrcidProfilePlugin.inc.php b/OrcidProfilePlugin.inc.php
--- a/OrcidProfilePlugin.inc.php	(revision 4f9c3ba9a825617401b9e18858ee39771af6dbf7)
+++ b/OrcidProfilePlugin.inc.php	(revision 83e29cb7fd8bd88d9d4d0c9855b081c0a250e01e)
@@ -281,6 +281,12 @@
 				'contexts' => array('frontend', 'backend')
 			)
 		);
+
+		switch ($template) {
+			case 'frontend/pages/userRegister.tpl':
+				$templateMgr->registerFilter('output', [$this, 'registrationFilter']);
+				break;
+		}
 		return false;
 	}

This is in the handleTemplateDisplay() function.

  1. Enable Google recpatcha for user registration
  2. See if issue noted above can be recreated.

What application are you using?
OJS, OMP or OPS version X.X.X

Additional information

  • I have previously tried to reproduce this interaction in a test environment but was unable to. The bug was reported with OJS 3.3, but will presumably apply to 3.4 and the main branch as well and any fix in 3.3 should be investigated.
  • The connect ORCID button is currently removed (see diff above) in the stable-3_3_0 and stable-3_4_0 branches.
  • Addressing this negative interaction is a prerequisite to restoring the connect ORCID button on the user registration page.
  • I've labeled this as a low priority bug because the workaround of removing the button completely removes the issue, but it a widely used feature in the community and restoring its functionality is a community priority.
@ewhanson ewhanson added Bug:1:Low A bug that does not have a severe consequence or affects a small number of users. Community:1:Common Any issue that is commonly requested by the community. labels Aug 14, 2024
@ewhanson ewhanson added this to the 3.3.0-x milestone Aug 14, 2024
@taslangraham taslangraham self-assigned this Aug 22, 2024
@taslangraham
Copy link
Contributor

With ORCID and Recaptcha enabled on my local install of OJS 3.3, I successfully registered a user. I've attached a video demo.

orcid-recaptcha.mp4

Not sure if any difference between my local environment an a prod-type environment could be contributing to this issue.
@jnugent Tagging you here as you commented the original issue. If you're still able to produce this issue, please let me know along with any additional info/steps you think might be useful.

@jnugent
Copy link
Member

jnugent commented Aug 27, 2024

Hi @taslangraham I rarely get to come back to these after I file them, but we haven't heard from clients recently about this issue. I know @ewhanson has done some work here so perhaps the issue is fixed now.

@ewhanson
Copy link
Collaborator Author

Thanks @jnugent, I had done some investigation a while ago, but was never able to reproduce the issue either. I suppose it's possible that whatever was causing issues on the recaptcha end of things was fixed by Google.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug:1:Low A bug that does not have a severe consequence or affects a small number of users. Community:1:Common Any issue that is commonly requested by the community.
Projects
Development

No branches or pull requests

3 participants