Commit graph

3469 commits

Author SHA1 Message Date
jenkins-bot da1f50aff4 Merge "Add basic tests for QuestyCaptcha" 2015-01-23 21:03:51 +00:00
jenkins-bot 3710af668b Merge "MWException -> Exception" 2015-01-23 21:03:34 +00:00
Florianschmidtwelzow db92340dbc Hygiene: Set action for createuser and badlogin
CAPTCHA classes should always be possible to detect the actual action,
which triggered the CAPTCHA. E.g. to add special fields in getForm().

Change-Id: Ie95305b2e6dcbf527a23c92613755092185e6a05
2015-01-21 08:19:04 +01:00
Translation updater bot 7ccf70ddd9 Localisation updates from https://translatewiki.net.
Change-Id: I0d27a7e58a51f382927d3867975d695fb13b2d86
2015-01-20 21:57:00 +01:00
jenkins-bot 2ff09eb831 Merge "Captcha.php: modified to add captcha to 'extrafields' in Userlogin and Usercreate" 2015-01-20 19:24:46 +00:00
Translation updater bot 027fac1a78 Localisation updates from https://translatewiki.net.
Change-Id: I2b1746a78af597d727681985eef05b48cc003ae0
2015-01-19 22:01:16 +01:00
Sumit Asthana 2237e2c4ce Captcha.php: modified to add captcha to 'extrafields' in Userlogin and Usercreate
Captcha.php inserts captcha in the header of Userlogin and Usercreate template.
This leads to inconsistent view because js,if enabled, moves the captcha before
submit button. Now the captcha is inserted at the 'extrafields' parameter just
before submit button in both the templates,for uniformity of view.

JS functionality in
resources/src/mediawiki.special/mediawiki.special.userlogin.common.js migrated
to backed in FancyCaptcha.class.php, so that the FancyCaptch is already styled
and positioned before 'submit'.
Depends on I82c68814e79cbc5aa250a308862c59fcbb6fd527
Depends on Ie95305b2e6dcbf527a23c92613755092185e6a05

Bug: T85192
Bug: T87190
Change-Id: If9a68aaee2cf98d63647816ccc8fc0bad12ca3d3
2015-01-19 18:43:50 +00:00
Translation updater bot 2d8804479f Localisation updates from https://translatewiki.net.
Change-Id: Ied12676ffaf704cd9f98513683f8168254634fc4
2015-01-16 21:17:18 +01:00
Translation updater bot b3a5a7fc34 Localisation updates from https://translatewiki.net.
Change-Id: I1402e23df40e08ec17728f89be1e6f1e369b1f49
2015-01-14 22:37:45 +01:00
Ori Livneh ce20b1cef8 MWException -> Exception
Change-Id: I816b62c93e4eb08514b122add614f5457d6fad9a
2015-01-09 17:48:35 -08:00
Translation updater bot b0678d96dd Localisation updates from https://translatewiki.net.
Change-Id: Ia3d6878d91a5442467aa5ec61b25195357ef8d0b
2015-01-09 22:06:41 +01:00
Translation updater bot 0793ec6915 Localisation updates from https://translatewiki.net.
Change-Id: I8df821cee8846f9291e2ead6ce9534188db6bacb
2015-01-06 22:24:01 +01:00
Kunal Mehta 3244e44bd2 Add basic tests for QuestyCaptcha
Change-Id: I799e110ae42cd8cd3dc2276d638039d23149ca37
2015-01-05 14:19:13 +01:00
Translation updater bot 46bed60df7 Localisation updates from https://translatewiki.net.
Change-Id: I929aa72dea49efd26bcc5064cbfeec45c03e2b77
2015-01-02 22:32:52 +01:00
jenkins-bot 4af677fcf1 Merge "Show Captcha after click on edit over buttons on EditPage" 2014-12-30 19:54:52 +00:00
Kunal Mehta 5ed7e42d1b Use __DIR__ directly
Change-Id: Ie9f94fc91d3e582d332c3a4f26917b7f3e033ffa
2014-12-30 11:04:51 -08:00
jenkins-bot ebc4667a1b Merge "Improved the QuestyCaptcha syntax for setting questions and answers" 2014-12-30 18:14:50 +00: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
Translation updater bot fb887bc634 Localisation updates from https://translatewiki.net.
Change-Id: I51f4b11545ed9073197d137115949684d812ad15
2014-12-20 22:21:15 +01:00
Translation updater bot 812eb079fe Localisation updates from https://translatewiki.net.
Change-Id: Ib88ce7498a1949a8f5367bbfc3f822ea834722e5
2014-12-18 23:18:24 +01:00
Translation updater bot 0951fc8d20 Localisation updates from https://translatewiki.net.
Change-Id: I77bce0e2f9cd44d90b1670427e07114acec91632
2014-12-16 21:55:59 +01:00
Translation updater bot 436e02f335 Localisation updates from https://translatewiki.net.
Change-Id: I11f557d216c996e2a74d988d5e8dd5d756412d99
2014-12-13 22:28:16 +01: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
Translation updater bot d3f89805e7 Localisation updates from https://translatewiki.net.
Change-Id: If228b728ee8046f7e87a60515daf04ce2a337215
2014-12-07 21:52:56 +01:00
Translation updater bot 0d14af907e Localisation updates from https://translatewiki.net.
Change-Id: I30e73ae00d06d1c7c300ec41881259f6965c25a5
2014-12-03 22:26:20 +01:00
Translation updater bot 86b0508778 Localisation updates from https://translatewiki.net.
Change-Id: Ibbaf0b37e7d67a59666262b43c99ce1ecbe8ebe7
2014-12-02 22:03:44 +01:00
Translation updater bot a9447d65a6 Localisation updates from https://translatewiki.net.
Change-Id: I5b0bf50bae33ef1e09c50f331a6c76e1887965c3
2014-12-01 22:20:38 +01:00
Translation updater bot b1c9cf3cf3 Localisation updates from https://translatewiki.net.
Change-Id: I08b38cd817c50b8bf08de85ace0fd296587b1a14
2014-11-30 22:10:00 +01:00
Translation updater bot 3c9093b73f Localisation updates from https://translatewiki.net.
Change-Id: Ib8e3140a1f5cdaa9da751c2a5c71d1af0003ac2d
2014-11-26 22:29:54 +01:00
Translation updater bot d59f393cd4 Localisation updates from https://translatewiki.net.
Change-Id: Iaf16647a24d48b8401d5e228d305308a5bff4d30
2014-11-14 22:22:36 +01:00
Translation updater bot 628cb06e91 Localisation updates from https://translatewiki.net.
Change-Id: Iaf720c65efcd44b9880819025cd339a7c0f7852c
2014-11-11 22:10:40 +01:00
Translation updater bot 62abd58059 Localisation updates from https://translatewiki.net.
Change-Id: I40f611beb6e39c440ead751be57cde9fad9cb84f
2014-11-10 22:07:43 +01:00
Translation updater bot 4d239e5b26 Localisation updates from https://translatewiki.net.
Change-Id: If43165984c7ef894f2ba152e85115a23e10513dd
2014-11-04 23:26:06 +01:00
Brad Jorsch 0532c2257a Add i18n for API module help
MediaWiki core change I04b1a384 added support for i18n of API module
help. This takes advantage of that while still maintaining backwards
compatibility with earlier versions of MediaWiki.

Once support for MediaWiki before 1.25 is dropped, the methods marked
deprecated in this patch may be removed.

Change-Id: I67395aff48185f3e09da31b51a08aa2541fe6a17
2014-10-29 16:37:38 -04:00
Translation updater bot 118bb82537 Localisation updates from https://translatewiki.net.
Change-Id: Ia02d2d90ea1a8ea827b5e78cef35a4e9471b7624
2014-10-28 15:14:42 +01:00
Translation updater bot 8bbcc60f20 Localisation updates from https://translatewiki.net.
Change-Id: I782d416fe05e7969c8ab3526148954d2e1c83550
2014-10-27 20:08:59 +01:00
Translation updater bot 0b4d85ce38 Localisation updates from https://translatewiki.net.
Change-Id: I57184498c0226ebaebcb7aa1e40a30449abefd84
2014-10-26 21:07:08 +01:00
Jackmcbarn 333e065361 Support protocol-relative URLs in the whitelist
Bug: 61556
Change-Id: Icac9f8357ac08db0cf2f5be562e9ed1f8f13eba3
2014-10-22 10:10:37 -04:00
jenkins-bot e9f5984153 Merge "Remove Asirra integration" 2014-10-20 21:54:18 +00:00
Translation updater bot eb2dedcb5a Localisation updates from https://translatewiki.net.
Change-Id: I2b1c765db99ef8026aec81debb9ad1d13df55bbd
2014-10-16 23:03:46 +02:00
Translation updater bot ffb5300f9b Localisation updates from https://translatewiki.net.
Change-Id: I108df5995466517e3847df2bde46c0df825fcb09
2014-10-09 21:18:30 +02:00
Reedy bb139148bf Remove Asirra integration
Bug: 71712
Change-Id: Ieb3b0386f10d241e8d9b711ebf1ae2520e74c111
2014-10-07 16:18:09 +01:00
Translation updater bot 49b0b00adf Localisation updates from https://translatewiki.net.
Change-Id: I8458c8e325d974effd5a8e497a33e7af920391d2
2014-10-05 22:10:08 +02:00
Translation updater bot 58f50b0c8d Localisation updates from https://translatewiki.net.
Change-Id: I506ce97e80a7a70738fca41987f49c2651d13d2d
2014-09-27 20:27:35 +02:00
Luis Felipe Schenone 614c626964 Improved the QuestyCaptcha syntax for setting questions and answers
Simple change to one method, QuestyCaptcha::getCaptcha, that allows to
set questions and answers like so:

$wgCaptchaQuestions = array(
	'The capital of England?' => 'London',
	'The capital of France?' => 'Paris',
	'The capital of Spain?' => 'Madrid',
);

Backwards compatibility with the previous syntax has been preserved.

Change-Id: Ife16bfb4c63864f8bc9117dad15136288564e2b0
2014-09-26 17:25:09 +08:00
Tim Starling 6f286e52db Add a gradient to FancyCaptcha
This defeats naive thresholding, giving Tesseract break rate of 0 out of
1000, even if a sensible threshold value is hand-chosen. Reduced the
text value and noise to make room for the gradient, but kept an SNR of
1.3, as before, which provides good legibility.

Obviously the gradient can be removed with custom preprocessing -- the
point of these changes is to raise the bar from "unconfigured Tessearct"
to "some small amount of developer effort".

Change-Id: I30ebc904ca59bf29a2aa812f881a077a13493e68
2014-09-26 10:41:26 +10:00
Tim Starling df4806c64c Improve FancyCaptcha resistance to OCR
Tesseract is a popular open source OCR package. Running it on
FancyCaptcha images, with no training or configuration, yielded a 56%
break rate. By restricting the character set, the OCR break rate was
improved to 66%.

So:
* Reduce k, increase wob scale, increase rr fuzz. The net effect of
  these three changes is to more reliably bend the baseline. In the old
  captcha, the baseline would often be bent by chance, but when it
  wasn't bent, it provided a very easy challenge for the OCR engine.
  This reduced the break rate from 66% to around 40%.
* Introduce additive noise, based on a bilinear upscale of a random
  greyscale image. This, combined with the above change, reduces the
  Tesseract break rate to 6%.

Change-Id: I05b5bb6475de9378cd89cce13b1b2f28b32cd405
2014-09-26 08:47:55 +10:00
Translation updater bot f552e05158 Localisation updates from https://translatewiki.net.
Change-Id: I9970408d127282b8aac75c42339c7caf8a7d871c
2014-09-22 21:43:40 +02:00
Translation updater bot 2d3c9e2f0e Localisation updates from https://translatewiki.net.
Change-Id: I52d8670a71d734fdbccd2b475d665e91d090d986
2014-09-20 21:40:10 +02:00
Translation updater bot 8000329cda Localisation updates from https://translatewiki.net.
Change-Id: I03063c8f010efb7e00b62bf9a434c1f24ba43fd3
2014-09-16 19:42:41 +02:00