MediaWiki
1.30.0
|
Public Member Functions | |
addCaptchaAPI (&$resultArr) | |
APIGetAllowedParams (&$module, &$params, $flags) | |
createAuthenticationRequest () | |
describeCaptchaType () | |
getCaptcha () | |
Returns an array with 'question' and 'answer' keys. More... | |
getCaptchaInfo ( $captchaData, $id) | |
getError () | |
getFormInformation ( $tabIndex=1) | |
Displays the reCAPTCHA widget. More... | |
onAuthChangeFormFields (array $requests, array $fieldInfo, array &$formDescriptor, $action) | |
passCaptcha ( $challenge, $response) | |
Calls the library function recaptcha_check_answer to verify the users input. More... | |
retrieveCaptcha ( $index) | |
Fetch this session's captcha info. More... | |
storeCaptcha ( $info) | |
Generate a captcha session ID and save the info in PHP's session storage. More... | |
Public Member Functions inherited from SimpleCaptcha | |
addFormInformationToOutput (OutputPage $out, array $formInformation) | |
Processes the given $formInformation array and adds the options (see getFormInformation()) to the given OutputPage object. More... | |
addFormToOutput (OutputPage $out, $tabIndex=1) | |
Uses getFormInformation() to get the CAPTCHA form and adds it to the given OutputPage object. More... | |
buildRegexes ( $lines) | |
Build regex from whitelist. More... | |
captchaTriggers ( $title, $action) | |
clearCaptcha ( $index) | |
Clear out existing captcha info from the session, to ensure it can't be reused. More... | |
confirmEditMerged ( $context, $content, $status, $summary, $user, $minorEdit) | |
An efficient edit filter callback based on the text after section merging. More... | |
confirmEmailUser ( $from, $to, $subject, $text, &$error) | |
Check the captcha on Special:EmailUser. More... | |
editShowCaptcha ( $editPage) | |
Insert the captcha prompt into an edit form. More... | |
filterLink ( $url) | |
Filter callback function for URL whitelisting. More... | |
findLinks ( $title, $text) | |
Extract a list of all recognized HTTP links in the text. More... | |
getLinksFromTracker ( $title) | |
Load external links from the externallinks table. More... | |
getMessage ( $action) | |
Show a message asking the user to enter a captcha on edit The result will be treated as wiki text. More... | |
increaseBadLoginCounter ( $username) | |
Increase bad login counter after a failed login. More... | |
injectEmailUser (&$form) | |
Inject whazawhoo @fixme if multiple thingies insert a header, could break. More... | |
isBadLoginPerUserTriggered ( $u) | |
Is the per-user captcha triggered? More... | |
isBadLoginTriggered () | |
Check if a bad login has already been registered for this IP address. More... | |
isIPWhitelisted () | |
Check if the current IP is allowed to skip captchas. More... | |
keyMatch ( $answer, $info) | |
Check if the submitted form matches the captcha session data provided by the plugin when the form was generated. More... | |
loadText ( $title, $section, $flags=Revision::READ_LATEST) | |
Retrieve the current version of the page or section being edited... More... | |
log ( $message) | |
Log the status and any triggering info for debugging or statistics. More... | |
needCreateAccountCaptcha (User $creatingUser=null) | |
Logic to check if we need to pass a captcha for the current user to create a new account, or not. More... | |
passCaptchaFromRequest (WebRequest $request, User $user) | |
Given a required captcha run, test form input for correct input on the open session. More... | |
passCaptchaLimited ( $index, $word, User $user) | |
Checks, if the user reached the amount of false CAPTCHAs and give him some vacation or run self::passCaptcha() and clear counter if correct. More... | |
passCaptchaLimitedFromRequest (WebRequest $request, User $user) | |
Checks, if the user reached the amount of false CAPTCHAs and give him some vacation or run self::passCaptcha() and clear counter if correct. More... | |
resetBadLoginCounter ( $username) | |
Reset bad login counter after a successful login. More... | |
setAction ( $action) | |
setTrigger ( $trigger) | |
shouldCheck (WikiPage $page, $content, $section, $context, $oldtext=null) | |
showEditFormFields (&$editPage, &$out) | |
Show error message for missing or incorrect captcha on EditPage. More... | |
showHelp () | |
Show a page explaining what this wacky thing is. More... | |
Protected Member Functions | |
getCaptchaParamsFromRequest (WebRequest $request) | |
Protected Member Functions inherited from SimpleCaptcha | |
isAPICaptchaModule ( $module) | |
Static Protected Attributes | |
static | $messagePrefix = 'recaptcha-' |
Static Protected Attributes inherited from SimpleCaptcha | |
static | $messagePrefix = 'captcha-' |
Private Attributes | |
$recaptcha_error = null | |
Additional Inherited Members | |
Protected Attributes inherited from SimpleCaptcha | |
string | $action |
Used to select the right message. More... | |
string | $trigger |
Used in log messages. More... | |
Definition at line 5 of file ReCaptcha.class.php.
ReCaptcha::addCaptchaAPI | ( | & | $resultArr | ) |
array | $resultArr |
Reimplemented from SimpleCaptcha.
Definition at line 77 of file ReCaptcha.class.php.
References $recaptcha_error, and describeCaptchaType().
ReCaptcha::APIGetAllowedParams | ( | & | $module, |
& | $params, | ||
$flags | |||
) |
ApiBase | $module | |
array | $params | |
int | $flags |
Reimplemented from SimpleCaptcha.
Definition at line 100 of file ReCaptcha.class.php.
References $flags, $params, SimpleCaptcha::isAPICaptchaModule(), and ApiBase::PARAM_HELP_MSG.
ReCaptcha::createAuthenticationRequest | ( | ) |
Reimplemented from SimpleCaptcha.
Definition at line 155 of file ReCaptcha.class.php.
ReCaptcha::describeCaptchaType | ( | ) |
Reimplemented from SimpleCaptcha.
Definition at line 85 of file ReCaptcha.class.php.
References global.
Referenced by addCaptchaAPI().
ReCaptcha::getCaptcha | ( | ) |
Returns an array with 'question' and 'answer' keys.
Subclasses might use different structure. Since MW 1.27 all subclasses must implement this method.
Reimplemented from SimpleCaptcha.
Definition at line 138 of file ReCaptcha.class.php.
ReCaptcha::getCaptchaInfo | ( | $captchaData, | |
$id | |||
) |
array | $captchaData | |
string | $id |
Reimplemented from SimpleCaptcha.
Definition at line 148 of file ReCaptcha.class.php.
References wfMessage().
|
protected |
WebRequest | $request |
Reimplemented from SimpleCaptcha.
Definition at line 36 of file ReCaptcha.class.php.
ReCaptcha::getError | ( | ) |
Reimplemented from SimpleCaptcha.
Definition at line 116 of file ReCaptcha.class.php.
References $recaptcha_error.
ReCaptcha::getFormInformation | ( | $tabIndex = 1 | ) |
Displays the reCAPTCHA widget.
If $this->recaptcha_error is set, it will display an error in the widget.
Reimplemented from SimpleCaptcha.
Definition at line 17 of file ReCaptcha.class.php.
References Xml::encodeJsVar(), global, Html::inlineScript(), recaptcha_get_html(), and wfDeprecated().
ReCaptcha::onAuthChangeFormFields | ( | array | $requests, |
array | $fieldInfo, | ||
array & | $formDescriptor, | ||
$action | |||
) |
array | $requests | |
array | $fieldInfo | |
array | $formDescriptor | |
string | $action |
Reimplemented from SimpleCaptcha.
Definition at line 165 of file ReCaptcha.class.php.
References $req, $requests, class, ConfirmEditHooks::getInstance(), and global.
ReCaptcha::passCaptcha | ( | $challenge, | |
$response | |||
) |
Calls the library function recaptcha_check_answer to verify the users input.
Sets $this->recaptcha_error if the user is incorrect.
string | $challenge | Challenge value |
string | $response | Response value |
Reimplemented from SimpleCaptcha.
Definition at line 51 of file ReCaptcha.class.php.
References $recaptcha_error, $response, $wgRequest, and global.
ReCaptcha::retrieveCaptcha | ( | $index | ) |
Fetch this session's captcha info.
string | $index |
Reimplemented from SimpleCaptcha.
Definition at line 133 of file ReCaptcha.class.php.
ReCaptcha::storeCaptcha | ( | $info | ) |
Generate a captcha session ID and save the info in PHP's session storage.
(Requires the user to have cookies enabled to get through the captcha.)
A random ID is used so legit users can make edits in multiple tabs or windows without being unnecessarily hobbled by a serial order requirement. Pass the returned id value into the edit form as wpCaptchaId.
array | $info | data to store |
Reimplemented from SimpleCaptcha.
Definition at line 127 of file ReCaptcha.class.php.
|
staticprotected |
Definition at line 8 of file ReCaptcha.class.php.
|
private |
Definition at line 11 of file ReCaptcha.class.php.
Referenced by addCaptchaAPI(), getError(), and passCaptcha().