Commit graph

97 commits

Author SHA1 Message Date
Kunal Mehta 0ebe3f7a28 Fix file permissions
Change-Id: If4855e3a6d7d35dd94093108f4da3bd1362f6827
2016-06-09 16:19:58 -07:00
paladox 1d08dd07b8 Add extension.json, empty PHP entry point
Changed README to README.md

Moved changelog from README.md to CHANGELOG.md

Bumped version to 1.4.0. And start following semver-notation.

Bug: T88047
Change-Id: I21f417d9f5985598358d53a0afae815543f001ee
2015-10-31 19:22:16 +00:00
Paladox 30490fba52 Add php code sniffer
Change-Id: I298b8b936a2b86deea75c302d88a7391cdb221c9
2015-10-28 21:46:29 +00:00
Aaron Schulz daa1f05d40 Fixed "throw" statement
Change-Id: Ie1b15cc718efbbafc6885cb0282099661250c048
2015-05-23 09:51:06 -07:00
Florian 806c8862df Clean up ConfirmEdit.php entry point and move common files to common places
2. step to use ExtensionRegistration

Bug: T88047
Change-Id: Ifcac2ad0d792a05c391ca1776824e05ab703d5cf
2015-05-21 17:49:13 +02:00
Florian bd5c5d494e Move i18n to Captcha modules own directory
1. change in preparation for ExtensionRegistration.

Bug: T88047
Change-Id: Ia3b84d3cb71832749ae73774dadb292dc4b9157b
2015-05-21 17:32:51 +02:00
Florianschmidtwelzow 52b643e7b4 Disable Captchas in phpunit
There is no need to run tests with enabled Captchas, because these tests
doesn't cover captchas.

Bug: T44145
Change-Id: I52ce63e08a1b71ba92642834c5dfbe3d2149f822
2015-02-11 10:21:28 +01:00
Ricordisamoa a8b9140def Add 'license-name' to extension credits matching SPDX conventions
References:
http://spdx.org/licenses/
https://www.mediawiki.org/wiki/Manual:$wgExtensionCredits#license-name

Change-Id: I9faf9e0bdff5783a9a90eb82e61e00a33b199afe
2015-01-29 06:36:44 +00:00
jenkins-bot da1f50aff4 Merge "Add basic tests for QuestyCaptcha" 2015-01-23 21:03:51 +00:00
Kunal Mehta 3244e44bd2 Add basic tests for QuestyCaptcha
Change-Id: I799e110ae42cd8cd3dc2276d638039d23149ca37
2015-01-05 14:19:13 +01:00
florianschmidtwelzow 7e0651a3c4 Show Captcha after click on edit over buttons on EditPage
Insert Captcha direct after click on Edit over editpage buttons, instead of
show after click on save. If the captcha was incorrect or empty, show
error message at old captcha position.

Bug: 19648
Change-Id: Ia3bb66f98aa84bb6efb7a1e42fbc203b401e99b8
2014-12-24 17:44:07 +00:00
Tim Starling 40c7e9c9aa Use the shared parse on API edit
ConfirmEdit was tripling the API save time, because it was parsing the
entire content twice to evaluate whether the addurl trigger is hit.

While I was here, I stopped using the deprecated non-Content hooks. The
new hook, EditEditFilterMergedContent, does not pass an EditPage object,
which means that Title or WikiPage objects need to be passed around
instead. Also, since EditPage::showEditForm() cannot be called with no
EditPage object, use a EditPage::showEditForm:fields hook instead.

If non-wikitext content is edited, assume that the regex trigger is not
hit.

For further architectural details, see the associated core change:
I4b4270dd868a . MW_EDITFILTERMERGED_SUPPORTS_API is a constant
introduced to detect the presence of the associated core change.

Also, in APIGetAllowedParams, set the allowed parameters even if we are
not on the help screen. This allows API users to submit their CAPTCHA
answer without it failing with an "unrecognized parameter" error.

Compatibility with MediaWiki 1.21 is retained, compatibility before that
is dropped.

Change-Id: I9529b7e8d3fc9301c754b28fda185aa3ab36f13e
2014-12-08 10:56:17 +11:00
Siebrand Mazeland aca764a8c2 Migrate to JSON i18n
Procedure per https://www.mediawiki.org/wiki/Manual:GenerateJsonI18n.php
with shim.

Change-Id: I71327ba3a0db3f9a94afcac033f1d2fde0ca4173
2014-03-26 12:58:25 +01:00
Reedy b4e4ee3fca Remove unused/incomplete stale HTMLCaptchaField
Fixup type hint to remove Captcha type

Change-Id: I30cdf2a34dce9f8bf6731c845d7910fad1d42e42
2014-02-18 02:13:12 +00:00
Brion Vibber 78e6f5ec79 Use new hooks in API action=createaccount for Captcha
Hooks used:
* AddNewAccountApiForm
* AddNewAccountApiResult

This adds a 'captcha' section to the results with the same format
as we provide for editing; you'll get this for instance at the
same time as you do a first-request that prompts for a token.

No modification to the result status is included; presence of
the 'captcha' section is assumed to be enough to prompt the client
to fetch and render the captcha prompt.

Failure to pass a captcha will return an API error message; a
subsequent commit fixes problems with that error message being
hard to machine-read.

Note that logic from inside Captcha::confirmUserCreate has been
pulled out to Captcha::needCreateAccountCaptcha so we don't
send captcha information to users who don't need it.

Requires core changes: If5b7dab8

Sample API client: https://github.com/brion/api-createaccount

Bug: 46072

Change-Id: Id628defaeab2bf5979ca8f4284d14fc42d9c3e46
2014-01-17 12:49:23 -08:00
Matthew Flaschen faba9da0c5 Update call to MathRenderer due to changes to Math extension.
Bug: 46132
Change-Id: I8ee3fd1360327e849d4ec217b212608636995d73
2013-04-18 00:08:52 -07:00
Siebrand Mazeland ab86ecf25e (bug 45461) Use email instead of e-mail
Change-Id: Ic9071861e050309523e0f143b18c815d7c136554
2013-02-27 12:35:40 +01:00
Siebrand Mazeland 3ef1ab740a More maintenance for ConfirmEdit extension.
* Replace dirname( __FILE__ ) by __DIR__.
* Replace deprecated method calls. Now requires MediaWiki 1.19 or later.
* Fix some documentation.
* Remove commented out code.
* Remove superfluous newlines.

Change-Id: Ib73e1619aa331c83e375224b6adae4c1e5db3bb9
2012-09-02 14:26:45 +02:00
Sam Reed aec19953f0 Bug 34354 - Move ConfirmEdit into antispam extension group 2012-02-13 14:08:07 +00:00
Siebrand Mazeland f6d4ab758c stylize.php, some indentation fixes and some brackets added. 2012-01-12 08:58:40 +00:00
Siebrand Mazeland 437bc7b2d8 Bye, bye $wgExtensionAliasesFiles (deprecated in 1.16). 2011-12-25 23:09:26 +00:00
John Du Hart a3255b5469 Removing global usage in the global scope 2011-12-23 21:24:12 +00:00
Brion Vibber 3edbac3674 Update a butt-ton of extension about URLs to point to https://www.mediawiki.org/ 2011-12-13 23:49:33 +00:00
Sam Reed 9e4951f262 Fix hook copy paste fail
Move rest of captcha params out of api/ApiEditPage.php
2011-11-23 20:37:13 +00:00
Sam Reed 80e9b337ee Kill the abstract Captcha class
Not used anywhere, everything else uses the SimpleCaptcha class as the base
2011-11-23 19:21:12 +00:00
Sam Reed 0a66fd76f1 MW_SUPPORTS_EDITFILTERMERGED has been in since r27416
Kill the alternate EditFilter hook usage (underlying code still used, probably wants refactoring at somepoint)

Simplify a boolean return
2011-11-23 19:18:30 +00:00
Sam Reed 64b6239348 * (bug 32609) API: Move captchaid/captchaword of action=edit from core to Captcha extension(s)
Left setting of wpCaptchaId and wpCaptchaWord in core. Can't think of a sane way to check and set them via an extension (subclass and override, or a hook). Annoyingly APIEditBeforeSave doesn't pass the params array
2011-11-23 19:09:57 +00:00
Platonides 7a92b816ec Tabs to aligned spaces 2011-09-01 16:54:59 +00:00
Yaron Koren 8a3bc55dd8 Version 1.1: Asirra module added 2011-07-12 17:27:56 +00:00
Happy-melon 86f875a58a Beginnings of a rewrite of the captcha system in a more object-oriented fashion; currently although there are classes for different types of captcha, they don't actually represent a single captcha object, they're just confused frontend/backend messes. With the places captchas are inserted increasingly using HTMLForm, it makes eminent sense to introduce a HTMLCaptchaField, but that needs a more OOP implementation of the actual captcha, which I've started here. This is not finished and isn't actually implemented anywhere, but a) it's harmless, b) I don't want it to bitrot, and c) some feedback would always be appreciated, so here it is. 2011-04-24 11:47:03 +00:00
Happy-melon 54fa154b40 Introduce a CaptchaStore abstract class that CaptchaSessionStore and CaptchaCacheStore can extend. Some tidying, documentation and type hinting. 2011-04-24 11:41:49 +00:00
Happy-melon 1bbd72e5fd Reorganise files in ConfirmEdit 2011-04-23 11:44:47 +00:00
Happy-melon f5ce74f85f Polish off all special-page-by-global-function instances in extensions. The preferred syntax is now exclusively $wgSpecialPages['PageName'] = 'ClassExtendingSpecialPage', where that class has a constructor which calls SpecialPage::__construct('PageName'). 2011-04-14 14:39:57 +00:00
Brion Vibber d1d1b6871f * (bug 27083) Extension info for Special:Version can include '...' as a special value which is turned into the localized 'others' used for Special:Version author lists. 2011-02-05 00:58:07 +00:00
Mark A. Hershberger c75ec400a7 followup r81318 & r81312 so that FIXME and revert can live (somewhat) happily 2011-02-02 01:14:41 +00:00
Raimond Spekking d6adab516d Revert r81312: PHP Fatal error: Call to undefined function wfMsg() in /www/w/extensions/ConfirmEdit/ConfirmEdit.php on line 43 2011-02-01 20:36:34 +00:00
Mark A. Hershberger 2c169ad09f followup r81239 fix FIXME 2011-02-01 18:41:37 +00:00
Sam Reed 1cccda834f Followup r81231, r81229
svn:eol-style native

Fix credits

Fix ?>
2011-01-31 09:50:27 +00:00
Yaron Koren fb60663a5c Improved comments, created a version number ("1.0", for lack of a better number) 2011-01-31 05:30:34 +00:00
Sam Reed 0324318073 Correct the address of the FSF in extension GPL headers
59 Temple Place -> 51 Franklin Street
2010-06-21 13:45:17 +00:00
Siebrand Mazeland 3db4c19909 Replace Title::makeTitle[Safe]( NS_SPECIAL, 'x' ) with SpecialPage::getTitleFor ( 'x' )
And a few other minor changes.
2010-06-08 19:30:48 +00:00
Alexandre Emsenhuber f6b61b4dd6 Big changes to extensions' documentation:
* changed all @addtogroup to @ingroup
* added some @file where needed
* changed some @package/@subpackage to @ingroup
2010-06-06 15:12:22 +00:00
Happy-melon 32102375f8 Implement captchas for sending emails via Special:EmailUser. 2010-04-10 21:26:03 +00:00
Siebrand Mazeland fdc2e20037 * Remove $wgExtensionCredits['description'] where $wgExtensionCredits['descriptionmsg'] present. This feature was introduced in MediaWiki 1.12, and 'description' is not used if 'descriptionmsg' is present.
* Random indentation updates and trailing whitespace removed
2010-02-22 23:41:51 +00:00
Siebrand Mazeland 4a6c4e2bcf * Update messages for QuestyCaptcha
* stylize.php and trailing whitespace removed for ConfirmEdit
* add support for QuestyCaptcha to Translate
* svn execute bits removed
2009-07-19 15:13:01 +00:00
Siebrand Mazeland e43d30d061 Add special page aliases 2009-05-24 09:20:04 +00:00
Shinjiman fb35385650 Follows up r49890, adding file location itself to obtaining the revision number shown in the Special:Version 2009-04-27 03:15:19 +00:00
Chad Horohoe 290c25a814 Big commit. Removing svn-version and svn-date from extensions. Per the list, these versions do not give valuable information and are often wildly inaccurate. 2009-03-26 17:39:49 +00:00
Aryeh Gregor 03da9b6796 * Change $wgCaptchaBadLoginAttempts to be inclusive of the first attempt, so that the old default is 1. 0 now really means that 0 bad logins are tolerated before the captcha is displayed, i.e., it's always displayed even with no bad logins. This seems to make more sense (certainly compared to setting it to -1 to always display the captcha).
* Set the default to 3 instead of 1, to be more forgiving of mistyped passwords.  Unlikely to help bots much; quite likely to help blind people who aren't really really really careful typers.
* Commit some whitespace change I had lying around.
2008-07-02 23:09:26 +00:00
Chad Horohoe 21d725024c (bug 13918), make CAPTCHA less obtrusive. Added a new global $wgCaptchaBadLoginAttempts which can be set to allow 1 (or more) failed attempts before triggering the captcha on login. Default is 0 (current behavior). 2008-07-02 15:00:30 +00:00