Skip to content

Fix recaptcha missing due to plugin change#11883

Merged
mekarpeles merged 1 commit intointernetarchive:masterfrom
cdrini:hotfix/recaptcha
Feb 17, 2026
Merged

Fix recaptcha missing due to plugin change#11883
mekarpeles merged 1 commit intointernetarchive:masterfrom
cdrini:hotfix/recaptcha

Conversation

@cdrini
Copy link
Copy Markdown
Collaborator

@cdrini cdrini commented Feb 17, 2026

Closes #11879 . Remove reliance on the dynamic construction of import paths, which feels like an anti-pattern.

Technical

Testing

Confirmed the recaptcha code appears on https://testing.openlibrary.org/account/create

Screenshot

Stakeholders

@mekarpeles @RayBB

Copilot AI review requested due to automatic review settings February 17, 2026 18:50
@github-actions github-actions bot added the Priority: 1 Do this week, receiving emails, time sensitive, . [managed] label Feb 17, 2026
@RayBB
Copy link
Copy Markdown
Collaborator

RayBB commented Feb 17, 2026

I don't think I can test but I strongly agree.

This is also the general approach I'm moving towards via this plugins refactor (which we should carefully check)
#11762

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a broken registration button by removing unnecessary plugin existence checks that were preventing recaptcha from being properly initialized. The issue was that the is_plugin_enabled() function was checking whether plugins were dynamically loaded, but the recaptcha configuration is always available in the config file.

Changes:

  • Removed is_plugin_enabled() helper function and its usage in both account creation and book addition flows
  • Simplified recaptcha initialization by directly checking for valid config keys instead of checking plugin loading status

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
openlibrary/plugins/upstream/addbook.py Removed is_plugin_enabled() function and simplified get_recaptcha() to check only recaptcha_exempt() before accessing config
openlibrary/plugins/upstream/account.py Removed is_plugin_enabled() method from account_create class and simplified get_recap() to directly access config keys

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mekarpeles mekarpeles merged commit 31c674c into internetarchive:master Feb 17, 2026
9 checks passed
@cdrini cdrini deleted the hotfix/recaptcha branch February 17, 2026 19:50
@RayBB RayBB removed the On Testing label Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: 1 Do this week, receiving emails, time sensitive, . [managed]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Registration button is broken

4 participants