Commit graph

11 commits

Author SHA1 Message Date
Umherirrender 1254022153 Improve some parameter docs
Change-Id: Idce2db0b489c19ec9b936cfc4ced3792e6f9711d
2017-09-24 12:14:11 +00:00
Reedy 33f0462f22 Param docs and type hints
Change-Id: I848133a979c4e3277e0187a67c4ebcf4098e9446
2017-02-17 13:26:54 +00:00
Bingxing Wang f0932984b9 Fixing unexcepted HTML escaping in QuestyCaptcha.
HTML-based questions (e.g. images) will not work well with QuestyCaptcha
on MediaWiki 1.27 due to an unexcepted HTML escape. This commit fixes the
issue by declaring raw HTML form mode, just like MathCaptcha.

Bug: T147606
Change-Id: Icc7c47b88b8aa44425acfa3d58d353ddc73bc87e
2016-10-07 07:07:02 +00:00
Florian e566dcb966 Remove getForm() and replace by getFormInformation()
This commit removes SimpleCaptcha::getForm() and replaces it by its more informative
counterpart getFormInformation(), which returns an array, which provides some
more information about the form than only the html.

The information included in the array is:
 * html: The HTML of the CAPTCHA form (this is the same as what you expected from
   getForm() previously)
 * modules: ResourceLoader modules, if any, that should be added to the output of the
   page
 * modulestyles: ResourceLoader style modules, if any, that should be added to th
   output of the page
 * headitems: Head items that should be added to the output (see OutputPage::addHeadItems)

Mostly you shouldn't need to handle the response of getFormInformation() anymore, as there's
a new function, addFormToOutput(), which takes an instance of OutputPage as a first parameter
and handles the response of getFormInformation for you (adds all information to the given
OutputPage instance, if they're provided).

Bug: T141300
Depends-On: I433afd124b57526caa13a540cda48ba2b99a9bde
Change-Id: I25f344538052fc18993c43185fbd97804a7cfc81
2016-08-04 01:45:13 +00:00
Gergő Tisza 31c59374a4 Add AuthManager support to SimpleCaptcha, QuestyCaptcha, FancyCaptcha, MathCaptcha
Also update MathCaptcha so that it works with recent versions of
Math (and breaks with old ones). Also fix MathCaptcha API output,
which used to send the question in plaintext.

Bug: T110302
Change-Id: I0da671a546700110d789b79a3089460abd9cce3b
Depends-On: I8b52ec8ddf494f23941807638f149f15b5e46b0c
2016-05-16 09:50:25 +00:00
Kunal Mehta 9ea898ba2a build: Updating mediawiki/mediawiki-codesniffer to 0.7.1
Also added "composer fix" command.

Change-Id: Ibda3fd002c577c7f7c41920d67ec44fedbd27cb8
2016-05-09 16:41:17 -07:00
Paladox 30490fba52 Add php code sniffer
Change-Id: I298b8b936a2b86deea75c302d88a7391cdb221c9
2015-10-28 21:46:29 +00:00
Florianschmidtwelzow 443bfac8a8 Add a way to use different tab indexes for CAPTCHA input form
And use it for UsercreateTemplate.

Bug: T113432
Change-Id: I56a618f2132fbcf3fea1a3ce6a409ce90709e849
2015-09-27 01:29:18 +02:00
Florianschmidtwelzow 36abbc6288 Implement support for Google reCAPTCHA 2.0 ("No captcha")
This change adds a new Captcha type (ReCaptchaNoCaptcha) that uses
Google reCAPTCHA 2.0.

See more:
- https://www.google.com/recaptcha/intro/
- https://developers.google.com/recaptcha/docs/display
- https://developers.google.com/recaptcha/docs/faq
- http://googleonlinesecurity.blogspot.com/2014/12/are-you-robot-introducing-no-captcha.html

Bug: T84918
Change-Id: I5908fd2716786237adb01a403d5bd1e22d95c563
2015-06-27 03:00:11 +02:00
Florianschmidtwelzow 258f5019f1 Make Questy answers in arrays case-insensitive
Before, QuestyCaptcha answers were case-insensitive when there was
only one answer for a question, but they had to be lowercase when
there was an array of answers. This makes it so that when an array
of answers is provided for a question in $wgCaptchaQuestions, those
answers are case-insensitive.

Bug: T65272
Change-Id: I146b53cacf901c45ce27bd87fdf8125bfd2bc270
2015-06-12 17:58:37 +02:00
Florian 2f0db346eb Move QuestyCaptcha to its own place
Bug: T88047
Change-Id: I8c8f97d49dc39445dbba9c12909b81898838a253
2015-05-23 07:49:47 +00:00
Renamed from QuestyCaptcha.class.php (Browse further)