Jump to content

امتداد:تأكيد_التعديل

From mediawiki.org
This page is a translated version of the page Extension:ConfirmEdit and the translation is 34% complete.
الدليل المرجعي لامتدادات ميدياويكي
ConfirmEdit
حالة الإصدار مستقر
تنفيذ تصرف خاصة بالصفحة
بيان يضيف حروف تحقق «كابتشا» لحالات حفظ الصفحات وكذلك تصرفات مستخدمين أخرى
المؤلف/المؤلفون
  • Brooke Vibber
  • Florian Schmidt
  • Sam Reed
آخر إصدار 1.6.0 (تحديثات مستمرة)
سياسة التوافق تصدر اللقطات البرمجية مع ميدياويكي. الإصدار الرئيسي لا يتوافق مع الإصدارات السابقة.
  • $wgCaptchaBadLoginPerUserAttempts
  • $wgConfirmEditLoadedCaptchas
  • $wgCaptchaRegexes
  • $wgCaptchaBypassIPs
  • $wgHCaptchaDeveloperMode
  • $wgHCaptchaUseRiskScore
  • $wgHCaptchaProxy
  • $wgHCaptchaSiteKey
  • $wgHCaptchaCSPRules
  • $wgHCaptchaApiUrlIntegrityHash
  • $wgHCaptchaVerifyUrl
  • $wgHCaptchaEnterpriseHealthCheckApiUrlRetryCount
  • $wgHCaptchaApiUrl
  • $wgCaptchaBadLoginAttempts
  • $wgCaptchaStorageClass
  • $wgCaptchaSessionExpiration
  • $wgHCaptchaEnterpriseHealthCheckSiteVerifyErrorThreshold
  • $wgHCaptchaSecureEnclave
  • $wgHCaptchaSendRemoteIP
  • $wgCaptchaTriggers
  • $wgHCaptchaInvisibleMode
  • $wgHCaptchaEnterpriseHealthCheckApiUrlErrorThreshold
  • $wgConfirmEditEnabledAbuseFilterCustomActions
  • $wgCaptchaBadLoginPerUserExpiration
  • $wgCaptchaTriggersOnNamespace
  • $wgHCaptchaEnterpriseHealthCheckApiUrlRetryDelayMs
  • $wgCaptchaBadLoginExpiration
  • $wgHCaptchaSecretKey
  • $wgCaptchaClass
  • $wgHCaptchaEnterpriseHealthCheckFailoverDuration
  • $wgHCaptchaEnterprise
  • $wgCaptchaAbuseFilterCaptchaConsequenceTTL
  • $wgHCaptchaVisualEditorOnLoadIntegrationEnabled
  • $wgCaptchaIgnoredUrls
  • skipcaptcha
Licence رخصة جنو العمومية 2.0 أو ما بعدها
التنزيل
ترجم الامتداد ConfirmEdit لو كان متوفرا على translatewiki.net
دور فاغرانت confirmedit
المسائل المهام المفتوحة · الإبلاغ عن عطل تقني

يسمح امتداد ConfirmEdit لك باستخدام عدة أساليب كابتشا كي تحاول منع بوتات النشر المزعج والأدوات الآلية الأخرى من تعديل موقعك الويكي وكذلك إحباط محاولات تسجيل الدخول الآلية التي تحاول تخمين كلمات المرور.

يحتوي امتداد ConfirmEdit على عدد من الأساليب أو الوحدات المستخدمة في توليد حروف التحقق.

وحدة برمجية الوصف مستوى الفعالية في وقف النشر المزعج
SimpleCaptcha يتعين عليك حل مسألة حسابية بسيطة. منخفض
FancyCaptcha يتعين على المستخدمين تحديد مجموعة من المحارف المعروضة بأسلوب مختلف عن المألوف. منخفض
QuestyCaptcha يتعين على المستخدمين الإجابة عن سؤال من بين مجموعة من الأسئلة يحددها الإداريين. مرتفع للغاية، إلى أن ينجح أحدهم في إيجاد ثغرة فيه
ReCaptchaNoCaptcha يعرض على المستخدمين أسلوب تحقق من أن المستخدم بشري يستند إلى جافا سكريبت. لو فشلت عملية التحقق، يعرض على المستخدم أحجية. متوسط إلى منخفض
hCaptcha مشابه لأداة reCAPTCHA، إلا أنه حسب شهادة البعض أفضل كفاءة من reCAPTCHA بفضل التوجه المختلف لتصميم كابتشا سهلة الاستخدام لذوي الحاجات الخاصة. منخفض
Turnstile Cloudflare Turnstile. كاشف البوتات الذي لا يتطلب تصرف من البشر (أو النقر في الخانة). يستند إلى إثبات العمل. مرتفع للغاية

بعض من هذه الوحدات البرمجية يتطلب أعمال تنصيب إضافية:

  • يتطلب FancyCaptcha تشغيل نص برمجي مبدئي للتثبيت في Python.

العيوب

ينتج عن CAPTCHAs تقليل سهولة الوصول وتتسبب في حدوث منغصات للمستخدمين من البشر.

هذه الأساليب أيضا ليست فعالة 100% في مواجهة البوتات كما أنها لن تحمي موقعك الويكي من الناشرين المزعجين الذين لا يتحرجون من بذل الجهد بأنفسهم لتخطي CAPTCHAs. قد ترغب في الاستعانة بامتداد ConfirmEdit مع سمات مكافحة النشر المزعج الأخرى. بغض النظر عن الحل البرمجي الذي تستخدمه، لو كان لديك موقع ويكي متاح للعامة تعديله من الأهمية بمكان متابعة صفحة «أحدث التغييرات» متابعة مستمرة.

التثبيت

هذا الامتداد يأتي مع إصدار ميدياويكي 1.18 وما بعده. يتعيّن أن تتبع كافة تعليمات الضبط الباقية.
ربما لا يعمل امتداد تأكيد التعديل لو استخدم في نسخة ميدياويكي مختلفة عن تلك المحددة أثناء التنزيل باستخدام «Extension distributor».
  • نزّل الملف/الملفات وضعها في دليل يحمل اسم ‎ConfirmEdit داخل مجلد ‎extensions/‎ لديك.
    يجب على مطوري البرمجيات والمساهمين بالكود البرمجي تثبيت الامتداد من غت بدلا من ذلك، مستخدمين:
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
    
  • أضف الكود التالي في الجزء الأسفل من ملف LocalSettings.php :
    wfLoadExtension( 'ConfirmEdit' );
    
  • تنشيط نوع CAPTCHA الذي يجب استخدامه دون مواربة (الإعداد $wgCaptchaClass)
  • الضبط حسب الحاجة
  • Yes تم التنفيذ – اذهب إلى Special:Version على موقع الويكي لديك كي تتحقق من أن الامتداد قد ثبت بنجاح.


تنصيب Vagrant:

  • لو كنت تستخدم Vagrant ، ثبته مستخدما vagrant roles enable confirmedit --provision

أنواع كابتشا

توجد أنواع كابتشا متعددة ومختلفة مشمولة في امتداد تأكيد التعديل. لاحظ أن MathCaptcha لم يرفع في 2024 (تغيير 1015991).

QuestyCaptcha

هذه الوحدة البرمجية تطرح سؤال على المستخدم وعليه أن يجب عن السؤال. يجب عليك أن تحدد الأسئلة أثناء ضبط الامتداد. أثبتت هذه الوحدة البرمجية أنها تقدم آلية متينة تواجه بوتات النشر المزعج؛ ونظن أنها تتمتع بميزة تيسير وصول أفضل، إذ يمكن لبرمجيات تحويل النصوص إلى كلام قراءة الأسئلة النصية وبالتالي يتيسر على المستخدمين الذين يعانون من صعوبات بصرية (لا البوتات) الإجابة عن الأسئلة إجابة صحيحة.

أضف ما يلي إلى LocalSettings.php لتمكين هذا الكابتشا، وتعديل الأسئلة والإجابات:

wfLoadExtensions([ 'ConfirmEdit', 'ConfirmEdit/QuestyCaptcha' ]);
$wgCaptchaClass = 'QuestyCaptcha';

// أضف سؤالك في LocalSettings.php مستخدما هذه الصيغة:
$wgCaptchaQuestions = [
	'What is the capital of France?' => 'Paris',
	'What is the capital of Spain' => 'MADRID', // لا يشترط أن تتبع الإجابات حالة الأحرف الصحيحة
	'What is the name of this wiki?' => $wgSitename, // يمكنك استخدام تغيرات
	'How many fingers does a hand have?' => [ 5, 'five' ], // يجوز أن تجيب عن السؤال عدة إجابات صحيحة
];

سيجري اختيار سؤال عشوائيا من تلك الموجودة.

الحد الأدنى هو واحد.

  • QuestyCaptcha لا تشترط استخدام حالة الأحرف الصحيحة. لو كانت الإجابة هي «Paris» وكتب المستخدم «paris»، أو لو كانت الإجابة «paris» وكتب المستخدم «Paris»، ستعمل على أي حال.
  • لو كانت الإجابة تحتوي على محرف خاص مثل «ó» يمكنك أن تكتب إجابة مستخدما «ó» وإجابة أخرى مستخدما «o» (حيث «o» تحل محل «ó»)، على أي حال. على سبيل المثال، لو كانت الإجابة «canción» يمكنك استخدام [ 'cancion', 'canción' ] في حال كتب المستخدم «cancion».
  • يتعين أن تكون الإجابة يسيرة التخمين لبشري مهتم بموقعك الويكي، وفي ذات الوقت غير يسيرة التخمين لبرامج آلية. أفضل طريق هو ألا تذكر الإجابة في نص السؤال؛ يمكنك محاولة تعديل رسائل مساعدة الكابتشا وذكر الإجابة في هذه الرسائل.[1]
  • غيّر الأسئلة متى أو إذا ثبت أنها غير مجدية؛ يجوز ألا يحدث هذا الأمر لو كان موقعك الويكي غير مستهدف على وجه التحديد.
  • لا تعد مطلقا استخدام أسئلة استخدمتها أنت أو غيرك في السابق: نعلم أن بوتات النشر المزعج تتذكر الأسئلة وإجاباتها إلى الأبد حال تعلم هذه المعلومات.
  • بل يمكنك أيضا توليد كابتشا كويستي بطريقة دينامية في الضبط. إياك أن تستخدم نسخة مطابقة من الأسئلة الدينامية المذكورة في الوصلة الشبكية. الناشرون المزعجون يعلمون بالفعل هذه الأسئلة. إلا أن الأسئلة الدينامية الأخرى فعالة للغاية في أسلوب الأسئلة المطروحة.
  • ثمة امتداد مستقل لخاصية ConfirmEdit اسمه QuestyCaptchaEditor يقدم صفحة خاصة على موقع الويكي لإدارة ربط أسئلة كويستي كابتشا والإجابات عنها. يجوز أن ترغب في التفكير مليا في تثبيته لو كان مرغوبا أن تقلل حالات تدخل إداري النظام حينما يتعلق الأمر بإدارة أسئلة كابتشا وإجاباتها.

ReCaptcha (NoCaptcha)

تحذير تحذير: تمكنت أغلب بوتات النشر المزعج التي تستهدف مواقع الويكي من التغلب على ReCaptcha، في المقام الأول بسبب بدائل كابتشا اليسيرة الوصول.

The new generation of ReCaptcha, called NoCaptcha, was introduced by Google back in December 2014 and reduces the need for humans to solve a CAPTCHA.[2] Based on a user-side JavaScript (which can't be controlled by the user, the administrator), reCaptcha tries to identify the site user as a human by analyzing their browsing behavior on the page. The user then has to click an "I'm not a robot" checkbox and (in the best case) doesn't have to do anything further to prove they're a human. In some cases, the user still has to solve a CAPTCHA image.

ReCaptcha will not work with the Mobile Source Editor and some extensions.

This module implements the new ReCaptcha NoCaptcha solution in ConfirmEdit.

You still need a public and a secret key (which you can retrieve from the ReCaptcha admin panel – change v2, v3 not work) and install the plugin with:

wfLoadExtensions([ 'ConfirmEdit', 'ConfirmEdit/ReCaptchaNoCaptcha' ]);
$wgCaptchaClass = 'ReCaptchaNoCaptcha';
$wgReCaptchaSiteKey = 'your public/site key here';
$wgReCaptchaSecretKey = 'your private key here';

There is an additional configuration option for this module, $wgReCaptchaSendRemoteIP (default: false), which, if set to true, sends the IP address of the current user to a server from Google while verifying the CAPTCHA. You can improve the privacy for your users if you keep this set to false. However, remember that this module adds a client-side JavaScript code, directly loaded from a server from Google, which already can collect the IP address of the user (combined with other data, too) and can not be limited by a configuration option. This will only work on the standard MediaWiki editor.

reCAPTCHA v3

Currently, there is no official way to implement version 3 of Google reCAPTCHA.

SimpleCaptcha (الحساب)

تحذير تحذير: This type is used by very few wikis, if any, probably because of scarce effectiveness.
A simple math question

This is the default CAPTCHA.

This module provides a simple addition or subtraction question for the user.

Add the following lines to LocalSettings.php in the root of your MediaWiki to enable this CAPTCHA:

wfLoadExtension( 'ConfirmEdit' );
$wgCaptchaClass = 'SimpleCaptcha';

Note that the display of a trivial maths problem as plaintext yields a captcha which can be trivially solved by automated means; as of 2012, sites using SimpleCaptcha are receiving significant amounts of spam and many automated registrations of spurious new accounts. Wikis currently using this as the default should therefore migrate to one of the other CAPTCHAs.

FancyCaptcha

تحذير تحذير: This type is used by very few wikis outside WMF, if any, probably because of scarce effectiveness.

This module displays a stylized image of a set of characters.

Pillow must be installed to create the set of images initially, but isn't needed after that (can be installed with pip install Pillow in most environments).

  1. Add the following lines to LocalSettings.php in the root of your MediaWiki installation:
    wfLoadExtensions([ 'ConfirmEdit', 'ConfirmEdit/FancyCaptcha' ]);
    $wgCaptchaClass = 'FancyCaptcha';
  2. In LocalSettings.php, set the variable $wgCaptchaDirectory to the directory where you will store Captcha images. Note: use the absolute directory path or relative to your wiki's installation directory Below it set $wgCaptchaSecret to your passphrase.
  3. Create the images by running the following:
    python /path/to/captcha.py --font=<font> --wordlist=<wordlist> --key=<key> --output=<output> --count=<count>
    • where font is a path to some font, for instance AriBlk.TTF.
    • wordlist is a path to some word list, for instance /usr/share/dict/words. (Note: on Debian/Ubuntu, the 'wbritish' and 'wamerican' packages provide such lists. On Fedora, use the 'words' package)
    • key is the exact passphrase you set $wgCaptchaSecret to. Use quotes if necessary.
    • output is the path to where the images should be stored (defined in $wgCaptchaDirectory).
    • count is how many images to generate.
    • An example, assuming you're in the extensions/ConfirmEdit directory (font location from Ubuntu 6.06, probably different on other operating systems):
    python captcha.py --font=/usr/share/fonts/truetype/freefont/FreeSans.ttf --wordlist=/usr/share/dict/words --key=FOO --output=../../../captcha --count=100
    • If you are not satisfied with the results of the words you've generated, you can remove the images and create a new set. Comic_Sans_MS_Bold.ttf seems to generate relatively legible words, and you could also edit the last line of captcha.py to increase the font size from the default of 40.
  4. Put the images you get into captcha directory in your installation.
  5. Edit your wiki's LocalSettings.php : specify the full path to your captcha directory in $wgCaptchaDirectory and secret key you've been using while generating captures in $wgCaptchaSecret.
$wgCaptchaDirectory = "/.php-data/my-wiki.org/wiki/captcha";
$wgCaptchaDirectoryLevels = 0; // Set this to a value greater than zero to break the images into subdirectories
$wgCaptchaSecret = "FOO"; // Same value you used in --key option in captcha.py

See also wikitech:Generating CAPTCHAs for how the Wikimedia Foundation does it.

How to avoid common problems running Python on Windows
  1. Install the most recent version of Pillow.
  2. Make the installation of Python on a short folder name, like C:\Python\
  3. Create a folder like C:\Ex and place files CAPTCHA.py / FONT.ttf / LIST.txt into the folder.
  4. To execute easily, run the following example as a batch file:
C:\python\python.exe C:\Ex\CAPTCHA.py --font C:\Ex\FONT.ttf --wordlist C:\Ex\LIST.txt --key=YOURPASSWORD --output C:\Ex\ --count=20

MathCaptcha

إصدار ميدياويكي:
1.39
تحذير تحذير: This type is used by very few wikis, if any, probably because of scarce effectiveness.
This requires the Math extension to be installed. Also, since this requires the PNG mode of the Math extension, it no longer works since MediaWiki 1.40.

This module generates an image using TeX to ask a basic math question.

Set the following to enable this CAPTCHA:

wfLoadExtensions([ 'ConfirmEdit', 'ConfirmEdit/MathCaptcha' ]);

See the README file in the math folder to install this captcha.

hCaptcha

إصدار ميدياويكي:
1.35

The configuration is similar to ReCaptcha:

wfLoadExtensions([ 'ConfirmEdit', 'ConfirmEdit/hCaptcha' ]);
$wgCaptchaClass = MediaWiki\Extension\ConfirmEdit\hCaptcha\HCaptcha::class;

$wgHCaptchaSiteKey = 'your public/site key here';
$wgHCaptchaSecretKey = 'your private key here';

Other configuration is available, depending on requirements of the setup of the wiki.

Configuration

hCaptcha brings in various configuration variables, some of which are considered enterprise features.

You will be required to create an account with hCaptcha to use this extension.

Configuration Flag Default Value Description
$wgHCaptchaProxy false Proxy to use for outbound PHP web requests to hCaptcha servers (HCaptchaVerifyUrl)
$wgHCaptchaSiteKey "" Sitekey from hCaptcha (requires creating an account)
$wgHCaptchaSecretKey "" Secret key from hCaptcha (requires creating an account)
$wgHCaptchaSendRemoteIP false Whether to send the client's IP address to hCaptcha
$wgHCaptchaApiUrl "https://js.hcaptcha.com/1/api.js" Url that the hCaptcha JS is loaded from; may want to use https://cn1.hcaptcha.com/1/api.js?endpoint=https://cn1.hcaptcha.com&assethost=https://assets-cn1.hcaptcha.com&imghost=https://imgs-cn1.hcaptcha.com&reportapi=https://reportapi-cn1.hcaptcha.com for Chinese visitors
$wgHCaptchaVerifyUrl "https://api.hcaptcha.com/siteverify" Url that the hCaptcha requested is verified against; may want to use https://cn1.hcaptcha.com/siteverify if server is in China
$wgHCaptchaEnterprise false Whether the provided sitekey is for hCaptcha Enterprise features. See https://www.hcaptcha.com/#enterprise-features
$wgHCaptchaInvisibleMode false Enable this to make the hCaptcha checkbox invisible and only show a challenge if hCaptcha determines it is needed. This forces the inclusion of a message with the hCaptcha Privacy Policy and Terms of Service
$wgHCaptchaCSPRules [ "https://hcaptcha.com", "https://*.hcaptcha.com" ] Urls to add to the Content Security Policies (CSP) for hcaptcha.com and *.hcaptcha.com to a page when loading a hCaptcha
$wgHCaptchaSecureEnclave false Whether to use hCaptcha's Secure Enclave mode. If enabled, then $wgHCaptchaEnterprise must be true (because it is an Enterprise feature). You will need to modify $wgHCaptchaApiUrl as appropriate, such as to use https://js.hcaptcha.com/1/secure-api.js and make rendering explicitSee https://docs.hcaptcha.com/enterprise/secure_enclave
$wgHCaptchaDeveloperMode false Whether to place hCaptcha integration in developer mode. When in developer mode, potentially sensitive information is logged to debug logs. Do not enable on production wikis.
$wgHCaptchaUseRiskScore false Whether to use captcha risk signal. Unless specifically enabled or in developer mode, we do not want that sensitive information to be stored.

Turnstile

إصدار ميدياويكي:
1.42

The configuration is similar to #ReCaptcha or #hCaptcha:

wfLoadExtensions([ 'ConfirmEdit', 'ConfirmEdit/Turnstile' ]);
$wgCaptchaClass = MediaWiki\Extension\ConfirmEdit\Turnstile\Turnstile::class;

$wgTurnstileSiteKey= 'your public/site key here';
$wgTurnstileSecretKey= 'your private key here';

$wgTurnstileSendRemoteIP is also available.

الإعداد

Integration with Extension:AbuseFilter

If ConfirmEdit and Extension:مرشح الإساءة are installed, then an AbuseFilter can be configured to show a CAPTCHA as a consequence for matching against a filter. It is recommended to load the ConfirmEdit extension before the AbuseFilter extension to ensure that this consequence functions correctly.

Don't require CAPTCHA from some users

ConfirmEdit introduces a 'skipcaptcha' permission type to wgGroupPermissions . This lets you set certain groups never to see CAPTCHAs. All of the following can be added to LocalSettings.php.

Defaults from ConfirmEdit.php:

$wgGroupPermissions['*']['skipcaptcha'] = false;
$wgGroupPermissions['user']['skipcaptcha'] = false;
$wgGroupPermissions['autoconfirmed']['skipcaptcha'] = false;
$wgGroupPermissions['bot']['skipcaptcha'] = true; // registered bots
$wgGroupPermissions['sysop']['skipcaptcha'] = true;

To skip captchas for users who confirmed their email, you need to set both:

$wgGroupPermissions['emailconfirmed']['skipcaptcha'] = true;
$wgAllowConfirmedEmail = true;

Set actions that require CAPTCHA

The following conditions can trigger a CAPTCHA to be displayed:

  • 'edit' – triggered on every attempted page save
  • 'create' – triggered on page creation
  • 'sendemail' – triggered when using Special:Emailuser
  • 'addurl' – triggered on a page save that would add one or more URLs to the page
  • 'createaccount' – triggered on creation of a new account
  • 'badlogin' – triggered after several failed login attempts from the same IP address
  • 'badloginperuser' – triggered after several failed login attempts using the same username

The default values for these are:

$wgCaptchaTriggers['edit'] = false;
$wgCaptchaTriggers['create'] = false;
$wgCaptchaTriggers['sendemail'] = false;
$wgCaptchaTriggers['addurl'] = true;
$wgCaptchaTriggers['createaccount'] = true;
$wgCaptchaTriggers['badlogin'] = true;
$wgCaptchaTriggers['badloginperuser'] = true;

The triggers edit, create and addurl can be configured per namespace using the $wgCaptchaTriggersOnNamespace setting. If there is no $wgCaptchaTriggersOnNamespace for the current namespace, the normal $wgCaptchaTriggers apply. So suppose that in addition to the above $wgCaptchaTriggers defaults we configure the following:

$wgCaptchaTriggersOnNamespace[NS_TALK]['addurl'] = false;
$wgCaptchaTriggersOnNamespace[NS_PROJECT]['edit'] = true;

Then the CAPTCHA will not trigger when adding URLs to a talk page, but on the other hand user will need to solve a CAPTCHA any time they try to edit a page in the project namespace, even if they aren't adding a link.

قوائم السماح لمعرفات الموارد الموحدة وعناوين الآيبي

It is possible to define a allow of known good sites for which the CAPTCHA should not kick in when the 'addurl' action is triggered.

Sysop users can edit the system message page called MediaWiki:Captcha-addurl-whitelist.

The expected format is a set of regex's one per line.

Comments can be added with # prefix.

You can see an example of this usage on OpenStreetMap.

This set of regexes can also be defined using the $wgCaptchaIgnoredUrls config variable in LocalSettings.php, to keep the value(s) a secret.

Some other variables you can add to LocalSettings.php:

  • $wgCaptchaBypassIPs – List of IP ranges to allow to skip the CAPTCHA (you can also use MediaWiki:Captcha-ip-whitelist; see below for details).
  • $wgAllowConfirmedEmail – Allow users who have confirmed their e-mail addresses to post URL links.

These are described more thoroughly in the code comments

MediaWiki:Captcha-ip-whitelist can change the allowed IP addresses and IP ranges on the wiki.

They should be separated by newlines.

If any other character (apart from a valid IP address or range) is found on a line, it will be ignored, but leading and trailing whitespace characters are allowed.

For example, a line with only 127.0.0.1 is considered valid but #127.0.0.1 will be ignored.

التعبيرات العادية

The global variable wgCaptchaRegexes accepts an array of regexes to be tested against the page text and triggers the CAPTCHA if a match is found.

محاولات تسجيل الدخول الفاشلة

When using the badlogin or badloginperuser triggers, the following configuration variables control how many failed login attempts per-IP and per-user are allowed before a CAPTCHA is required, and how long it takes until the CAPTCHA requirement expires:

$wgCaptchaBadLoginAttempts = 3;
$wgCaptchaBadLoginExpiration = 300; // 300 seconds = 5 minutes
$wgCaptchaBadLoginPerUserAttempts = 20;
$wgCaptchaBadLoginPerUserExpiration = 600; // 600 seconds = 10 minutes

The triggers require $wgMainCacheType to be set to something other than CACHE_NONE in your LocalSettings.php, if in doubt the following will always work.

$wgMainCacheType = CACHE_ANYTHING;

Note that these triggers do not trigger CAPTCHAs on API login but block them outright until the CAPTCHA requirement expires.

إعدادات ويكيميديا

For example, Wikimedia Foundation wikis use FancyCaptcha with a custom set of images and the default configuration, modified by what follows.

$wgGroupPermissions['autoconfirmed']['skipcaptcha'] = true;

This means only unregistered and newly registered users have to pass the CAPTCHA.

وضع EmergencyCaptcha

Additionally, the shortcut named $wmgEmergencyCaptcha is designed for use in a limited number of emergencies, for instance, in case of massive vandalism or spam attacks: it changes the default trigger values (see above) into the following:

$wgCaptchaTriggers['edit'] = true; 
$wgCaptchaTriggers['create'] = true;

So, in addition to the normal situation, all anonymous and new users have to solve a CAPTCHA before being able to save an edit or create a new page.

تحديد الحد الأقصى للمعدل

ConfirmEdit supports rate limiting for false CAPTCHA.

For more information about $wgRateLimits and how to set it up, read Manual:$wgRateLimits , the action key is badcaptcha.

المؤلفون

The basic framework was primarily designed by Brooke Vibber, who also wrote the SimpleCaptcha and FancyCaptcha modules.

The MathCaptcha module was written by Rob Church.

The QuestyCaptcha module was written by Benjamin Lees.

Additional maintenance work was done by Yaron Koren.

انظر أيضا

المراجع

  1. MediaWiki:Questycaptchahelp-text, MediaWiki:Questycaptcha-edit, MediaWiki:Questycaptcha-addurl, MediaWiki:Questycaptcha-create, MediaWiki:Questycaptcha-createaccount
  2. Google Blog Are you a robot? Introducing “No CAPTCHA reCAPTCHA” ()