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

Add QuestyCaptcha #405

Merged
merged 1 commit into from
Jan 3, 2024
Merged

Add QuestyCaptcha #405

merged 1 commit into from
Jan 3, 2024

Conversation

tarrow
Copy link
Contributor

@tarrow tarrow commented Dec 5, 2023

This relies on two new settings being available in the wikiInfo sent from the api:

  • wwUseQuestyCaptcha
  • wwCaptchaQuestions

Like other settings these are used as-is and are not checked in the settings file. However ConfirmEdit does escape the content which should mean that no additional escaping is necessary.

This does not add much additional code to the image since Questy is part of the ConfirmEdit extension, it just has to be specially loaded.

RecaptchaNoCaptcha remains in use whenever this setting is not enabled.

@tarrow
Copy link
Contributor Author

tarrow commented Dec 21, 2023

I wasted a great deal of time here failing to realise that the extension called ConfirmEdit/QuestyCaptcha doesn't have a dependency on ConfirmEdit. This resulted in no error or warning occurring but also no captcha being loaded.

@tarrow
Copy link
Contributor Author

tarrow commented Dec 21, 2023

If you're testing this before the api client from the UI is written or easy to use you can test this by manually setting things in the platform API using tinker like:

WikiSetting::updateOrCreate(["wiki_id" => <your_wiki_id>, "name" => "wwCaptchaQuestions", value => "{\"What is a thing\":[\"cat\"]}"])

WikiSetting::updateOrCreate(["wiki_id" => <your_wiki_id>, "name" => "wwUseQuestyCaptcha", value => "1"])

@tarrow tarrow marked this pull request as ready for review December 21, 2023 08:52
This relies on two new settings being available in the wikiInfo
sent from the api:
- wwUseQuestyCaptcha
- wwCaptchaQuestions

Like other settings these are used as-is and are not santiy checked
@AndrewKostka
Copy link
Contributor

It seems that ⧼questycaptcha-edit⧽ isn't being localized for me when testing this locally. I'd vote for fixing this in a follow-up ticket. It might be a bug in our version of ConfirmEdit.

@tarrow
Copy link
Contributor Author

tarrow commented Dec 22, 2023

for me too; I just assumed it was an issue of being british

@tarrow tarrow merged commit a5ba1f6 into main Jan 3, 2024
9 checks passed
@tarrow tarrow deleted the addQuesty branch January 3, 2024 17:41
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.

2 participants