id int64 0 1.29M | original_id stringlengths 32 32 | swhid stringlengths 100 170 | sha1 stringlengths 40 40 | repo_name stringlengths 2 45 | repo_group stringclasses 12
values | filepath stringlengths 5 153 | name stringlengths 1 14.9k | type stringclasses 3
values | code stringlengths 7 2.12M |
|---|---|---|---|---|---|---|---|---|---|
15,100 | dee749aecee0221d26fbad04267fdcb6 | swh:1:cnt:607e77009ad2ccca63dc689145bf615cdb9b817b;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=227-234/ | e8946b5ba236a4d810ebf22203e098f52e682a93 | ApiFeatureUsage | deployed | includes/ApiFeatureUsageQueryEngineElastica.php | ApiFeatureUsageQueryEngineElastica::record(
string $feature,
string $agent,
string $ipAddress
) | function | /** @inheritDoc */
public function record(
string $feature,
string $agent,
string $ipAddress
) {
// no-op; rely on debug log entries being routed to elastic search
} |
15,101 | d419b215cdee7e9055acaa7f20353b4f | swh:1:cnt:607e77009ad2ccca63dc689145bf615cdb9b817b;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=236-240/ | e8946b5ba236a4d810ebf22203e098f52e682a93 | ApiFeatureUsage | deployed | includes/ApiFeatureUsageQueryEngineElastica.php | ApiFeatureUsageQueryEngineElastica::prune( $progressFn = null, $limit = INF ) | function | /** @inheritDoc */
public function prune( $progressFn = null, $limit = INF ) {
// no-op; rely on manual index deletion
return false;
} |
15,102 | cb2ddd2e8bb6782a38884b7aae1bce63 | swh:1:cnt:b35beb2cbf60e7d50094243d0fc87acf19448825;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=8-41/ | 101aff9477731727dd376d58b0a0b351498f95f0 | ApiFeatureUsage | deployed | includes/ApiFeatureUsageQueryEngineElasticaConnection.php | ApiFeatureUsageQueryEngineElasticaConnection | type | /**
* Class to create the connection
*/
class ApiFeatureUsageQueryEngineElasticaConnection extends ElasticaConnection {
/** @var array */
private $options = [];
/**
* @param array|null $options
*/
public function __construct( $options = null ) {
if ( !is_array( $options ) ) {
$options = [];
}
if ( ... |
15,103 | c975cc55490ec35e85fcc16bebe2c73c | swh:1:cnt:b35beb2cbf60e7d50094243d0fc87acf19448825;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=15-30/ | 101aff9477731727dd376d58b0a0b351498f95f0 | ApiFeatureUsage | deployed | includes/ApiFeatureUsageQueryEngineElasticaConnection.php | ApiFeatureUsageQueryEngineElasticaConnection::__construct( $options = null ) | function | /**
* @param array|null $options
*/
public function __construct( $options = null ) {
if ( !is_array( $options ) ) {
$options = [];
}
if ( empty( $options['serverList'] ) || !is_array( $options['serverList'] ) ) {
throw new InvalidArgumentException( __METHOD__ . ': serverList is not set or is not valid... |
15,104 | 574e8ffd62eaaee5d2e8aada4afa0c01 | swh:1:cnt:b35beb2cbf60e7d50094243d0fc87acf19448825;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=37-40/ | 101aff9477731727dd376d58b0a0b351498f95f0 | ApiFeatureUsage | deployed | includes/ApiFeatureUsageQueryEngineElasticaConnection.php | ApiFeatureUsageQueryEngineElasticaConnection::getMaxConnectionAttempts() | function | /** @inheritDoc */
public function getMaxConnectionAttempts() {
return $this->options['maxConnectionAttempts'];
} |
15,105 | 19abf91ede2bc2c25c4e24ecf65221d1 | swh:1:cnt:b35beb2cbf60e7d50094243d0fc87acf19448825;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=32-35/ | 101aff9477731727dd376d58b0a0b351498f95f0 | ApiFeatureUsage | deployed | includes/ApiFeatureUsageQueryEngineElasticaConnection.php | ApiFeatureUsageQueryEngineElasticaConnection::getServerList() | function | /** @inheritDoc */
public function getServerList() {
return $this->options['serverList'];
} |
15,106 | 5fefa963643704fc7a1848c12a3e6c00 | swh:1:cnt:ef023107c85afd81a495d6a96a83afe21b4dc1af;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=23-394/ | fbc7b2c6b9509153e749059e1fad58166b624807 | ApiFeatureUsage | deployed | includes/ApiFeatureUsageQueryEngineSql.php | ApiFeatureUsageQueryEngineSql | type | class ApiFeatureUsageQueryEngineSql extends ApiFeatureUsageQueryEngine {
/** @var IConnectionProvider */
private $dbProvider;
/** @var WRStatsFactory */
private $wrStatsFactory;
/** @var BagOStuff */
private $cache;
/**
* @param IConnectionProvider $dbProvider
* @param WRStatsFactory $wrStatsFactory
* @pa... |
15,107 | 25fcb9ed802648de0469c81d5997f10b | swh:1:cnt:ef023107c85afd81a495d6a96a83afe21b4dc1af;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=31-74/ | fbc7b2c6b9509153e749059e1fad58166b624807 | ApiFeatureUsage | deployed | includes/ApiFeatureUsageQueryEngineSql.php | ApiFeatureUsageQueryEngineSql::__construct(
IConnectionProvider $dbProvider,
WRStatsFactory $wrStatsFactory,
ObjectCacheFactory $objectCacheFactory,
array $options
) | function | /**
* @param IConnectionProvider $dbProvider
* @param WRStatsFactory $wrStatsFactory
* @param ObjectCacheFactory $objectCacheFactory
* @param array $options Additional options include:
* - maxAgeDays: the age, in days, at which hit count rows are considered expired.
* - purgePeriod: average hit count ro... |
15,108 | 24ba5176d364e31dc9fecd8f23ba9841 | swh:1:cnt:ef023107c85afd81a495d6a96a83afe21b4dc1af;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=76-131/ | fbc7b2c6b9509153e749059e1fad58166b624807 | ApiFeatureUsage | deployed | includes/ApiFeatureUsageQueryEngineSql.php | ApiFeatureUsageQueryEngineSql::enumerate(
string $agent,
MWTimestamp $start,
MWTimestamp $end,
?array $features = null
) | function | /** @inheritDoc */
public function enumerate(
string $agent,
MWTimestamp $start,
MWTimestamp $end,
?array $features = null
) {
$cutoff = $this->getCutoffTimestamp();
$dbr = $this->dbProvider->getReplicaDatabase( 'virtual-apifeatureusage' );
$sqb = $dbr->newSelectQueryBuilder()
->select( [ 'afu_date'... |
15,109 | 8e761d7bf48cfe0a1865fae3aa33fce4 | swh:1:cnt:ef023107c85afd81a495d6a96a83afe21b4dc1af;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=133-162/ | fbc7b2c6b9509153e749059e1fad58166b624807 | ApiFeatureUsage | deployed | includes/ApiFeatureUsageQueryEngineSql.php | ApiFeatureUsageQueryEngineSql::suggestDateRange() | function | /** @inheritDoc */
public function suggestDateRange() {
$start = new MWTimestamp();
$start->setTimezone( 'UTC' );
$start->timestamp->setTime( 0, 0, 0 );
$end = new MWTimestamp();
$end->setTimezone( 'UTC' );
$cutoff = $this->getCutoffTimestamp();
$dbr = $this->dbProvider->getReplicaDatabase( 'virtual-ap... |
15,110 | 44a8dacf41c8c35093ff456baa1349eb | swh:1:cnt:ef023107c85afd81a495d6a96a83afe21b4dc1af;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=164-257/ | fbc7b2c6b9509153e749059e1fad58166b624807 | ApiFeatureUsage | deployed | includes/ApiFeatureUsageQueryEngineSql.php | ApiFeatureUsageQueryEngineSql::record(
string $feature,
string $agent,
string $ipAddress
) | function | /** @inheritDoc */
public function record(
string $feature,
string $agent,
string $ipAddress
) {
if (
defined( 'MW_PHPUNIT_TEST' ) &&
MediaWikiServices::getInstance()->isStorageDisabled()
) {
// Bail out immediately if storage is disabled. This should never happen in normal
// operations, but ca... |
15,111 | efb0abcaa9a81e441804f2d0e8e8ef72 | swh:1:cnt:ef023107c85afd81a495d6a96a83afe21b4dc1af;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=259-266/ | fbc7b2c6b9509153e749059e1fad58166b624807 | ApiFeatureUsage | deployed | includes/ApiFeatureUsageQueryEngineSql.php | ApiFeatureUsageQueryEngineSql::maybeDoPeriodicPrune() | function | private function maybeDoPeriodicPrune() {
if (
$this->options['purgePeriod'] > 0 &&
mt_rand( 1, $this->options['purgePeriod'] ) == 1
) {
$this->prune( null, $this->options['purgeBatchSize'] );
}
} |
15,112 | 2300cf5e12f0142fb9a29b2c0092f0ad | swh:1:cnt:ef023107c85afd81a495d6a96a83afe21b4dc1af;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=268-326/ | fbc7b2c6b9509153e749059e1fad58166b624807 | ApiFeatureUsage | deployed | includes/ApiFeatureUsageQueryEngineSql.php | ApiFeatureUsageQueryEngineSql::prune( $progressFn = null, $limit = INF ) | function | /** @inheritDoc */
public function prune( $progressFn = null, $limit = INF ) {
$cutoff = $this->getCutoffTimestamp();
$batchSize = min( $this->options['purgeBatchSize'], $limit );
$dbw = $this->dbProvider->getPrimaryDatabase( 'virtual-apifeatureusage' );
$doneCount = 0;
$totalCount = null;
if ( $progress... |
15,113 | 9d5001fbc86e0a5efab705490fb0eb20 | swh:1:cnt:ef023107c85afd81a495d6a96a83afe21b4dc1af;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=328-349/ | fbc7b2c6b9509153e749059e1fad58166b624807 | ApiFeatureUsage | deployed | includes/ApiFeatureUsageQueryEngineSql.php | ApiFeatureUsageQueryEngineSql::getCounterLotteryDelta( $dayHitTotal ) | function | /**
* @param int $dayHitTotal
* @return int Number of samples represented by this hit (0 if not sampled)
*/
private function getCounterLotteryDelta( $dayHitTotal ) {
// Always sample the first hit
if ( $dayHitTotal <= 0 ) {
return 1;
}
// How much to increment the feature use count for each sampled u... |
15,114 | da78df9ca86e53436fa7d8b14374ace8 | swh:1:cnt:ef023107c85afd81a495d6a96a83afe21b4dc1af;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=351-382/ | fbc7b2c6b9509153e749059e1fad58166b624807 | ApiFeatureUsage | deployed | includes/ApiFeatureUsageQueryEngineSql.php | ApiFeatureUsageQueryEngineSql::pingInsertLimiter( $ipAddress ) | function | /**
* @param string $ipAddress IP address of user triggering a row insertion
* @return bool Whether the row insertion limit was tripped
*/
private function pingInsertLimiter( $ipAddress ) {
if ( $ipAddress === '' ) {
return false;
}
$conds = [];
foreach ( $this->options['insertRateLimits'] as $type =... |
15,115 | 8bbd2be05d5b0eed959537dcdf04b49c | swh:1:cnt:ef023107c85afd81a495d6a96a83afe21b4dc1af;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=384-393/ | fbc7b2c6b9509153e749059e1fad58166b624807 | ApiFeatureUsage | deployed | includes/ApiFeatureUsageQueryEngineSql.php | ApiFeatureUsageQueryEngineSql::getCutoffTimestamp() | function | /**
* @return MWTimestamp
*/
private function getCutoffTimestamp() {
$cutoff = new MWTimestamp();
$cutoff->setTimezone( 'UTC' );
$cutoff->sub( 'P' . $this->options['maxAgeDays'] . 'D' );
return $cutoff;
} |
15,116 | 5a3b885ad57255dbc449857b080b50da | swh:1:cnt:a6598ca73e837372ac1e41be758155ce7e016e40;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=10-95/ | d4d029814e6b817c19abb988f5141fce542ba9f9 | ApiFeatureUsage | deployed | includes/ApiQueryFeatureUsage.php | ApiQueryFeatureUsage | type | class ApiQueryFeatureUsage extends ApiQueryBase {
public function __construct(
ApiQuery $query,
string $moduleName,
private readonly ApiFeatureUsageQueryEngine $engine,
) {
parent::__construct( $query, $moduleName, 'afu' );
}
/** @inheritDoc */
public function execute() {
$params = $this->extractRequest... |
15,117 | 895d1783d858ad88e23433fda247ef46 | swh:1:cnt:a6598ca73e837372ac1e41be758155ce7e016e40;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=11-17/ | d4d029814e6b817c19abb988f5141fce542ba9f9 | ApiFeatureUsage | deployed | includes/ApiQueryFeatureUsage.php | ApiQueryFeatureUsage::__construct(
ApiQuery $query,
string $moduleName,
private readonly ApiFeatureUsageQueryEngine $engine,
) | function | public function __construct(
ApiQuery $query,
string $moduleName,
private readonly ApiFeatureUsageQueryEngine $engine,
) {
parent::__construct( $query, $moduleName, 'afu' );
} |
15,118 | d85a479fb2d3474419dfafdd54f1de59 | swh:1:cnt:a6598ca73e837372ac1e41be758155ce7e016e40;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=90-93/ | d4d029814e6b817c19abb988f5141fce542ba9f9 | ApiFeatureUsage | deployed | includes/ApiQueryFeatureUsage.php | ApiQueryFeatureUsage::getHelpUrls() | function | /** @inheritDoc */
public function getHelpUrls() {
return 'https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:ApiFeatureUsage';
} |
15,119 | 1bf9dab165c10531232fef265a7a9949 | swh:1:cnt:a6598ca73e837372ac1e41be758155ce7e016e40;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=19-61/ | d4d029814e6b817c19abb988f5141fce542ba9f9 | ApiFeatureUsage | deployed | includes/ApiQueryFeatureUsage.php | ApiQueryFeatureUsage::execute() | function | /** @inheritDoc */
public function execute() {
$params = $this->extractRequestParams();
$agent = $params['agent'] === null
? $this->getMain()->getUserAgent()
: $params['agent'];
if ( $agent === '' ) {
$encParamName = $this->encodeParamName( 'agent' );
$this->dieWithError( 'apierror-apifeatureusage-e... |
15,120 | e80c371ceb53dcb59105da79166b3a14 | swh:1:cnt:a6598ca73e837372ac1e41be758155ce7e016e40;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=82-88/ | d4d029814e6b817c19abb988f5141fce542ba9f9 | ApiFeatureUsage | deployed | includes/ApiQueryFeatureUsage.php | ApiQueryFeatureUsage::getExamplesMessages() | function | /** @inheritDoc */
protected function getExamplesMessages() {
return [
'action=query&meta=featureusage'
=> 'apihelp-query+featureusage-example-simple',
];
} |
15,121 | 868b236b5a18851bcb316c8d754ac672 | swh:1:cnt:a6598ca73e837372ac1e41be758155ce7e016e40;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=63-80/ | d4d029814e6b817c19abb988f5141fce542ba9f9 | ApiFeatureUsage | deployed | includes/ApiQueryFeatureUsage.php | ApiQueryFeatureUsage::getAllowedParams() | function | /** @inheritDoc */
public function getAllowedParams() {
return [
'start' => [
ParamValidator::PARAM_TYPE => 'timestamp',
],
'end' => [
ParamValidator::PARAM_TYPE => 'timestamp',
],
'agent' => [
ParamValidator::PARAM_TYPE => 'string',
],
'features' => [
ParamValidator::PARAM_TYPE ... |
15,122 | 6f2bf92cfbe63f444b87c591c158e8d5 | swh:1:cnt:bb7043898ff4af931bd521ebec146c8b04b5443a;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=9-36/ | 849d9775aa83b48c9de57b1d0a923e3a9a58cde5 | ApiFeatureUsage | deployed | includes/Hooks.php | Hooks | type | class Hooks implements ApiDeprecationHelpHook, ApiLogFeatureUsageHook {
public function __construct( private readonly ApiFeatureUsageQueryEngine $engine ) {
}
/**
* Add deprecation help referring to Special:ApiFeatureUsage
* @param Message[] &$msgs
*/
public function onApiDeprecationHelp( &$msgs ) {
$msgs[... |
15,123 | 94f630aadef22fa286491a9bc91c2a6f | swh:1:cnt:bb7043898ff4af931bd521ebec146c8b04b5443a;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=10-11/ | 849d9775aa83b48c9de57b1d0a923e3a9a58cde5 | ApiFeatureUsage | deployed | includes/Hooks.php | Hooks::__construct( private readonly ApiFeatureUsageQueryEngine $engine ) | function | public function __construct( private readonly ApiFeatureUsageQueryEngine $engine ) {
} |
15,124 | 23636c0a13e922f0ac942bf851461964 | swh:1:cnt:bb7043898ff4af931bd521ebec146c8b04b5443a;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=21-35/ | 849d9775aa83b48c9de57b1d0a923e3a9a58cde5 | ApiFeatureUsage | deployed | includes/Hooks.php | Hooks::onApiLogFeatureUsage( $feature, array $clientInfo ) | function | /**
* Log/tally the use of deprecated API features
*
* @param string $feature
* @param array $clientInfo
* @phan-param array{userName:string,userAgent:string,ipAddress:string} $clientInfo
* @return void
*/
public function onApiLogFeatureUsage( $feature, array $clientInfo ): void {
$this->engine->record... |
15,125 | 8ffed81d0e6077e6f19c570e9f50e1bc | swh:1:cnt:bb7043898ff4af931bd521ebec146c8b04b5443a;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=13-19/ | 849d9775aa83b48c9de57b1d0a923e3a9a58cde5 | ApiFeatureUsage | deployed | includes/Hooks.php | Hooks::onApiDeprecationHelp( &$msgs ) | function | /**
* Add deprecation help referring to Special:ApiFeatureUsage
* @param Message[] &$msgs
*/
public function onApiDeprecationHelp( &$msgs ) {
$msgs[] = wfMessage( 'apifeatureusage-deprecation-help' );
} |
15,126 | d7863515c3cbc0a6b07bd1e49c2a3b77 | swh:1:cnt:0168a3c33dd435ae1b17bd3999f414a8fc8b575f;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=11-133/ | ec134f2f7090123cca9140d76fbef536241231e6 | ApiFeatureUsage | deployed | includes/SpecialApiFeatureUsage.php | SpecialApiFeatureUsage | type | class SpecialApiFeatureUsage extends SpecialPage {
public function __construct( private readonly ApiFeatureUsageQueryEngine $engine ) {
parent::__construct( 'ApiFeatureUsage' );
}
/** @inheritDoc */
public function execute( $par ) {
$this->setHeaders();
$this->addHelpLink( 'Extension:ApiFeatureUsage' );
$t... |
15,127 | 0145fabec792d31f32768eece252213c | swh:1:cnt:0168a3c33dd435ae1b17bd3999f414a8fc8b575f;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=12-14/ | ec134f2f7090123cca9140d76fbef536241231e6 | ApiFeatureUsage | deployed | includes/SpecialApiFeatureUsage.php | SpecialApiFeatureUsage::__construct( private readonly ApiFeatureUsageQueryEngine $engine ) | function | public function __construct( private readonly ApiFeatureUsageQueryEngine $engine ) {
parent::__construct( 'ApiFeatureUsage' );
} |
15,128 | 695ad2a24112919162dc43b4abdab0ea | swh:1:cnt:0168a3c33dd435ae1b17bd3999f414a8fc8b575f;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=16-114/ | ec134f2f7090123cca9140d76fbef536241231e6 | ApiFeatureUsage | deployed | includes/SpecialApiFeatureUsage.php | SpecialApiFeatureUsage::execute( $par ) | function | /** @inheritDoc */
public function execute( $par ) {
$this->setHeaders();
$this->addHelpLink( 'Extension:ApiFeatureUsage' );
$this->checkPermissions();
$request = $this->getRequest();
[ $start, $end ] = $this->engine->suggestDateRange();
$form = HTMLForm::factory( 'ooui', [
'agent' => [
'type' =>... |
15,129 | f1397afc99acc27506e058907e2da294 | swh:1:cnt:0168a3c33dd435ae1b17bd3999f414a8fc8b575f;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=116-127/ | ec134f2f7090123cca9140d76fbef536241231e6 | ApiFeatureUsage | deployed | includes/SpecialApiFeatureUsage.php | SpecialApiFeatureUsage::onSubmit( $data, $form ) | function | /**
* @param array $data
* @param HTMLForm $form
* @return Status
*/
public function onSubmit( $data, $form ) {
$agent = $data['agent'];
$start = new MWTimestamp( $data['startdate'] . 'T00:00:00Z' );
$end = new MWTimestamp( $data['enddate'] . 'T23:59:59Z' );
return $this->engine->enumerate( $agent, $s... |
15,130 | 71ef06bd0d4c679ebfc036d660435588 | swh:1:cnt:0168a3c33dd435ae1b17bd3999f414a8fc8b575f;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=129-132/ | ec134f2f7090123cca9140d76fbef536241231e6 | ApiFeatureUsage | deployed | includes/SpecialApiFeatureUsage.php | SpecialApiFeatureUsage::getGroupName() | function | /** @inheritDoc */
protected function getGroupName() {
return 'wiki';
} |
15,131 | 944ec59c799ce71bb3ca330afc38e697 | swh:1:cnt:dd063ae57a8628596deaa61c5b1a3fe9119005a6;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=9-32/ | 41408eebaf5cbff0801ce0cdac94ebbf5b7318ff | ApiFeatureUsage | deployed | includes/HookHandler/SchemaChangesHandler.php | SchemaChangesHandler | type | class SchemaChangesHandler implements LoadExtensionSchemaUpdatesHook {
/**
* @codeCoverageIgnore This is tested by installing or updating MediaWiki
* @param DatabaseUpdater $updater
*/
public function onLoadExtensionSchemaUpdates( $updater ) {
global $wgApiFeatureUsageQueryEngineConf;
if ( !is_a( $wgApiFea... |
15,132 | 5ec8a366bb9dbbcaf8a8f5cb3480a276 | swh:1:cnt:dd063ae57a8628596deaa61c5b1a3fe9119005a6;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=10-31/ | 41408eebaf5cbff0801ce0cdac94ebbf5b7318ff | ApiFeatureUsage | deployed | includes/HookHandler/SchemaChangesHandler.php | SchemaChangesHandler::onLoadExtensionSchemaUpdates( $updater ) | function | /**
* @codeCoverageIgnore This is tested by installing or updating MediaWiki
* @param DatabaseUpdater $updater
*/
public function onLoadExtensionSchemaUpdates( $updater ) {
global $wgApiFeatureUsageQueryEngineConf;
if ( !is_a( $wgApiFeatureUsageQueryEngineConf['class'], ApiFeatureUsageQueryEngineSql::class,... |
15,133 | eca38ccccddaaf7f2f5b9b26998099ba | swh:1:cnt:b2cdb60b8eee1130b422935a529182efc53d918d;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=13-64/ | 94ed1bc6d98aa9fdecef94d11eb87d49da43bffb | ApiFeatureUsage | deployed | maintenance/purgeExpiredUsageRecords.php | PurgeExpiredUsageRecords | type | class PurgeExpiredUsageRecords extends Maintenance {
/** @var null|string */
private $lastProgress;
/** @var null|float */
private $lastTimestamp;
/** @var int */
private $calls = 0;
/** @inheritDoc */
public function __construct() {
parent::__construct();
$this->addDescription( "Purge expired records fro... |
15,134 | 82589da6264a87cd9d7d3aa3e18f8747 | swh:1:cnt:b2cdb60b8eee1130b422935a529182efc53d918d;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=21-26/ | 94ed1bc6d98aa9fdecef94d11eb87d49da43bffb | ApiFeatureUsage | deployed | maintenance/purgeExpiredUsageRecords.php | PurgeExpiredUsageRecords::__construct() | function | /** @inheritDoc */
public function __construct() {
parent::__construct();
$this->addDescription( "Purge expired records from the usage query engine" );
} |
15,135 | d8fb3b1e188ae3466a301b9cf2f99fc9 | swh:1:cnt:b2cdb60b8eee1130b422935a529182efc53d918d;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=28-37/ | 94ed1bc6d98aa9fdecef94d11eb87d49da43bffb | ApiFeatureUsage | deployed | maintenance/purgeExpiredUsageRecords.php | PurgeExpiredUsageRecords::execute() | function | /** @inheritDoc */
public function execute() {
$this->output( "Deleting expired records\n" );
/** @var ApiFeatureUsageQueryEngine $engine */
$engine = MediaWikiServices::getInstance()->get( 'ApiFeatureUsage.QueryEngine' );
$this->lastTimestamp = microtime( true );
$engine->prune( [ $this, 'showProgressAndWai... |
15,136 | cab5f2c98dc20d4e6cebeec991b5e83b | swh:1:cnt:b2cdb60b8eee1130b422935a529182efc53d918d;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=39-63/ | 94ed1bc6d98aa9fdecef94d11eb87d49da43bffb | ApiFeatureUsage | deployed | maintenance/purgeExpiredUsageRecords.php | PurgeExpiredUsageRecords::showProgressAndWait( $percent ) | function | /**
* @param float $percent
* @return void
*/
public function showProgressAndWait( $percent ) {
$this->waitForReplication();
$this->calls++;
$percentString = sprintf( "%.1f", $percent );
if ( $percentString === $this->lastProgress ) {
// Only print a line if we've progressed >= 0.1% since the last pr... |
15,137 | 19edab92d1f8cb88c158b1a60879101b | swh:1:cnt:2360cdb5934c38300005c6a40c3b1195e7c1f128;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=8-125/ | 5b8e3fdd7d43570eb216070365288e38f1f54ce3 | ApiFeatureUsage | deployed | tests/phpunit/integration/ApiFeatureUsageQueryEngineSqlIntegrationTest.php | ApiFeatureUsageQueryEngineSqlIntegrationTest | type | /**
* @group Database
* @covers \MediaWiki\Extension\ApiFeatureUsage\ApiFeatureUsageQueryEngineSql
*/
class ApiFeatureUsageQueryEngineSqlIntegrationTest extends MediaWikiIntegrationTestCase {
public function testRecordAndEnumerate() {
$services = $this->getServiceContainer();
$engine = new ApiFeatureUsageQueryE... |
15,138 | c185f5b3d5d5eecaae4c44151107dcac | swh:1:cnt:2360cdb5934c38300005c6a40c3b1195e7c1f128;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=13-79/ | 5b8e3fdd7d43570eb216070365288e38f1f54ce3 | ApiFeatureUsage | deployed | tests/phpunit/integration/ApiFeatureUsageQueryEngineSqlIntegrationTest.php | ApiFeatureUsageQueryEngineSqlIntegrationTest::testRecordAndEnumerate() | function | public function testRecordAndEnumerate() {
$services = $this->getServiceContainer();
$engine = new ApiFeatureUsageQueryEngineSql(
$services->getDBLoadBalancerFactory(),
$services->getWRStatsFactory(),
$services->getObjectCacheFactory(),
[]
);
$featureA = 'legacy-feature-a';
$featureB = 'legacy-fea... |
15,139 | fe4d617d63e081d027173f3cb5d9b5a3 | swh:1:cnt:2360cdb5934c38300005c6a40c3b1195e7c1f128;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/ApiFeatureUsage.git;lines=81-124/ | 5b8e3fdd7d43570eb216070365288e38f1f54ce3 | ApiFeatureUsage | deployed | tests/phpunit/integration/ApiFeatureUsageQueryEngineSqlIntegrationTest.php | ApiFeatureUsageQueryEngineSqlIntegrationTest::testPrune() | function | public function testPrune() {
$services = $this->getServiceContainer();
$engine = new ApiFeatureUsageQueryEngineSql(
$services->getDBLoadBalancerFactory(),
$services->getWRStatsFactory(),
$services->getObjectCacheFactory(),
[ 'maxAgeDays' => 1 ]
);
$featureA = 'legacy-feature-a';
$userAgent = 'te... |
15,140 | e1e3c3e76c115b9dcd748b21172d91e5 | swh:1:cnt:dfb2d83028c7f7014feaf91d0d1a8685843369d9;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=42-447/ | a44f21b3db36c394eb0cca88b28df20a3ff62305 | AntiSpoof | deployed | includes/AntiSpoof.php | AntiSpoof | type | class AntiSpoof {
private const SCRIPT_DEPRECATED = 'DEPRECATED';
private const SCRIPT_UNASSIGNED = 'UNASSIGNED';
private const SCRIPT_ARABIC = 'ARABIC';
private const SCRIPT_ARMENIAN = 'ARMENIAN';
private const SCRIPT_ASCII_DIGITS = 'ASCII_DIGITS';
private const SCRIPT_ASCII_PUNCTUATION = 'ASCII_PUNCTUATION';
... |
15,141 | b861447c700bc01dda524049ccf3d095 | swh:1:cnt:dfb2d83028c7f7014feaf91d0d1a8685843369d9;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=239-245/ | a44f21b3db36c394eb0cca88b28df20a3ff62305 | AntiSpoof | deployed | includes/AntiSpoof.php | AntiSpoof::getEquivSet() | function | public static function getEquivSet(): Equivset {
if ( self::$equivset === null ) {
self::$equivset = new Equivset();
}
return self::$equivset;
} |
15,142 | 7d0eaed19d1327a490d2a310112dd04d | swh:1:cnt:dfb2d83028c7f7014feaf91d0d1a8685843369d9;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=247-256/ | a44f21b3db36c394eb0cca88b28df20a3ff62305 | AntiSpoof | deployed | includes/AntiSpoof.php | AntiSpoof::getScriptCode( int $ch ) | function | private static function getScriptCode( int $ch ): string {
# Linear search: binary chop would be faster...
foreach ( self::ALL_SCRIPT_RANGES as $range ) {
if ( $ch >= $range[0] && $ch <= $range[1] ) {
return $range[2];
}
}
# Otherwise...
return self::SCRIPT_UNASSIGNED;
} |
15,143 | 1f12ffe2d91496d0295253af30fcb600 | swh:1:cnt:dfb2d83028c7f7014feaf91d0d1a8685843369d9;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=262-272/ | a44f21b3db36c394eb0cca88b28df20a3ff62305 | AntiSpoof | deployed | includes/AntiSpoof.php | AntiSpoof::isAllowedScriptCombination( array $scriptList ) | function | /**
* Is this an allowed script mixture?
*/
private static function isAllowedScriptCombination( array $scriptList ): bool {
foreach ( self::ALLOWED_SCRIPT_COMBINATIONS as $allowedCombo ) {
if ( self::isSubsetOf( $scriptList, $allowedCombo ) ) {
return true;
}
}
return false;
} |
15,144 | 82afb25f452053574293610a16081397 | swh:1:cnt:dfb2d83028c7f7014feaf91d0d1a8685843369d9;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=258-260/ | a44f21b3db36c394eb0cca88b28df20a3ff62305 | AntiSpoof | deployed | includes/AntiSpoof.php | AntiSpoof::isSubsetOf( array $aList, array $bList ) | function | private static function isSubsetOf( array $aList, array $bList ): bool {
return count( array_diff( $aList, $bList ) ) === 0;
} |
15,145 | 3572837c8c6eb010eb95cffe5f6162fe | swh:1:cnt:dfb2d83028c7f7014feaf91d0d1a8685843369d9;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=274-288/ | a44f21b3db36c394eb0cca88b28df20a3ff62305 | AntiSpoof | deployed | includes/AntiSpoof.php | AntiSpoof::stringToList( string $str ) | function | /**
* Convert string into an array of Unicode code points as integers
* @return int[]
*/
private static function stringToList( string $str ): array {
$ar = [];
if ( !preg_match_all( '/./us', $str, $ar ) ) {
return [];
}
$out = [];
foreach ( $ar[0] as $char ) {
$out[] = Utils::utf8ToCodepoint( $ch... |
15,146 | 5757d300b140da525fd789d713c91654 | swh:1:cnt:dfb2d83028c7f7014feaf91d0d1a8685843369d9;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=290-296/ | a44f21b3db36c394eb0cca88b28df20a3ff62305 | AntiSpoof | deployed | includes/AntiSpoof.php | AntiSpoof::listToString( array $list ) | function | private static function listToString( array $list ): string {
$out = '';
foreach ( $list as $cp ) {
$out .= Utils::codepointToUtf8( $cp );
}
return $out;
} |
15,147 | 636b261d72807b929cb47bfdd9165be1 | swh:1:cnt:dfb2d83028c7f7014feaf91d0d1a8685843369d9;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=298-300/ | a44f21b3db36c394eb0cca88b28df20a3ff62305 | AntiSpoof | deployed | includes/AntiSpoof.php | AntiSpoof::hardjoin( array $a_list ) | function | private static function hardjoin( array $a_list ): string {
return implode( '', $a_list );
} |
15,148 | 4fca98195fb83104d3a855a9dd333043 | swh:1:cnt:dfb2d83028c7f7014feaf91d0d1a8685843369d9;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=302-304/ | a44f21b3db36c394eb0cca88b28df20a3ff62305 | AntiSpoof | deployed | includes/AntiSpoof.php | AntiSpoof::normalizeString( string $testName ) | function | public static function normalizeString( string $testName ): string {
return self::getEquivSet()->normalize( $testName );
} |
15,149 | fc58eb4c294a2642e0381f1fa10d86d9 | swh:1:cnt:dfb2d83028c7f7014feaf91d0d1a8685843369d9;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=306-320/ | a44f21b3db36c394eb0cca88b28df20a3ff62305 | AntiSpoof | deployed | includes/AntiSpoof.php | AntiSpoof::stripScript( array $text, string $script ) | function | /**
* @param int[] $text
* @param string $script
* @return int[]
*/
private static function stripScript( array $text, string $script ): array {
$scripts = array_map( [ __CLASS__, 'getScriptCode' ], $text );
$out = [];
foreach ( $text as $index => $char ) {
if ( $scripts[$index] !== $script ) {
$ou... |
15,150 | 46c48444a0addc48764ac7748a454bcb | swh:1:cnt:dfb2d83028c7f7014feaf91d0d1a8685843369d9;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=322-343/ | a44f21b3db36c394eb0cca88b28df20a3ff62305 | AntiSpoof | deployed | includes/AntiSpoof.php | AntiSpoof::badCharErr( string $msgId, int $point ) | function | /**
* Helper function for checkUnicodeStringStatus: Return an error on a bad character.
* @todo I would like to show Unicode character name, but it is not clear how to get it.
* @param string $msgId message identifier.
* @param int $point codepoint of the bad character.
* @return Status
*/
private static f... |
15,151 | 15d53f9bdb5dae37db9e93111465277a | swh:1:cnt:dfb2d83028c7f7014feaf91d0d1a8685843369d9;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=345-446/ | a44f21b3db36c394eb0cca88b28df20a3ff62305 | AntiSpoof | deployed | includes/AntiSpoof.php | AntiSpoof::checkUnicodeStringStatus( string $testName ) | function | /**
* TODO: does too much in one routine, refactor...
* @return Status<string>
* @since 1.32
*/
public static function checkUnicodeStringStatus( string $testName ): Status {
global $wgAntiSpoofProhibitedCharacters;
// Start with some sanity checking
if ( !is_array( $wgAntiSpoofProhibitedCharacters ) ) {... |
15,152 | 2b46c57a188b8a8aab2af2f923d447c7 | swh:1:cnt:3deb21de839cce6e563ca62e2ff7f0f22f744475;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=23-38/ | 86d16533c5e4ea51375cd7dd995858071f89d74f | AntiSpoof | deployed | includes/AntiSpoofAuthenticationRequest.php | AntiSpoofAuthenticationRequest | type | class AntiSpoofAuthenticationRequest extends AuthenticationRequest {
/** @var bool Set based on infos from getFieldInfo */
public bool $ignoreAntiSpoof = false;
/** @inheritDoc */
public function getFieldInfo() {
return [
'ignoreAntiSpoof' => [
'type' => 'checkbox',
'label' => wfMessage( 'antispoof-ig... |
15,153 | 386daee1376278cf88edfa5eeae93c31 | swh:1:cnt:3deb21de839cce6e563ca62e2ff7f0f22f744475;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=27-37/ | 86d16533c5e4ea51375cd7dd995858071f89d74f | AntiSpoof | deployed | includes/AntiSpoofAuthenticationRequest.php | AntiSpoofAuthenticationRequest::getFieldInfo() | function | /** @inheritDoc */
public function getFieldInfo() {
return [
'ignoreAntiSpoof' => [
'type' => 'checkbox',
'label' => wfMessage( 'antispoof-ignore' ),
'help' => wfMessage( 'antispoof-ignore-help' ),
'optional' => true,
],
];
} |
15,154 | 62d4714147455cd0fd0774faffc3400e | swh:1:cnt:bc12feec93d655c85ea8810aae8d5ea01820a55f;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=34-147/ | 0bb17163aabbb45fdb99e42057f3cce150ec8a44 | AntiSpoof | deployed | includes/AntiSpoofPreAuthenticationProvider.php | AntiSpoofPreAuthenticationProvider | type | class AntiSpoofPreAuthenticationProvider extends AbstractPreAuthenticationProvider {
/** @var bool False effectively disables this provider, but spoofed names will still be logged. */
protected bool $antiSpoofAccounts;
/**
* @param PermissionManager $permissionManager
* @param array $params Options:
* - antiS... |
15,155 | 5aeaddf0466cfaf7e383eef88f7e8fb9 | swh:1:cnt:bc12feec93d655c85ea8810aae8d5ea01820a55f;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=38-52/ | 0bb17163aabbb45fdb99e42057f3cce150ec8a44 | AntiSpoof | deployed | includes/AntiSpoofPreAuthenticationProvider.php | AntiSpoofPreAuthenticationProvider::__construct(
private readonly PermissionManager $permissionManager,
array $params = [],
) | function | /**
* @param PermissionManager $permissionManager
* @param array $params Options:
* - antiSpoofAccounts: (bool) stop spoofed accounts from being created. When false, only log.
*/
public function __construct(
private readonly PermissionManager $permissionManager,
array $params = [],
) {
global $wgAntiSpo... |
15,156 | ab3380981349f947b7a97bb082c848ed | swh:1:cnt:bc12feec93d655c85ea8810aae8d5ea01820a55f;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=129-142/ | 0bb17163aabbb45fdb99e42057f3cce150ec8a44 | AntiSpoof | deployed | includes/AntiSpoofPreAuthenticationProvider.php | AntiSpoofPreAuthenticationProvider::testUserForCreation( $user, $autocreate, array $options = [] ) | function | /** @inheritDoc */
public function testUserForCreation( $user, $autocreate, array $options = [] ) {
$sv = StatusValue::newGood();
// For "cancreate" checks via the API, test if the current user could
// create the username.
if ( $this->antiSpoofAccounts && !$autocreate && empty( $options['creating'] ) &&
!... |
15,157 | 827c7c075f9f62db4785c629cd712b92 | swh:1:cnt:bc12feec93d655c85ea8810aae8d5ea01820a55f;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=66-73/ | 0bb17163aabbb45fdb99e42057f3cce150ec8a44 | AntiSpoof | deployed | includes/AntiSpoofPreAuthenticationProvider.php | AntiSpoofPreAuthenticationProvider::testForAccountCreation( $user, $creator, array $reqs ) | function | /** @inheritDoc */
public function testForAccountCreation( $user, $creator, array $reqs ) {
/** @var AntiSpoofAuthenticationRequest $req */
$req = AuthenticationRequest::getRequestByClass( $reqs, AntiSpoofAuthenticationRequest::class );
$override = $req && $req->ignoreAntiSpoof && $creator->isAllowed( 'override-... |
15,158 | 624664ccae4efaa204f38ac01f35ad8c | swh:1:cnt:bc12feec93d655c85ea8810aae8d5ea01820a55f;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=75-127/ | 0bb17163aabbb45fdb99e42057f3cce150ec8a44 | AntiSpoof | deployed | includes/AntiSpoofPreAuthenticationProvider.php | AntiSpoofPreAuthenticationProvider::testUserInternal( UserIdentity $user, bool $override, LoggerInterface $logger ) | function | private function testUserInternal( UserIdentity $user, bool $override, LoggerInterface $logger ): StatusValue {
$name = $user->getName();
$spoofUser = $this->getSpoofUser( $user );
$mode = !$this->antiSpoofAccounts ? 'LOGGING ' : ( $override ? 'OVERRIDE ' : '' );
$active = $this->antiSpoofAccounts && !$override... |
15,159 | ba0888c3131b508138a6983c6d8ef8ed | swh:1:cnt:bc12feec93d655c85ea8810aae8d5ea01820a55f;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=54-64/ | 0bb17163aabbb45fdb99e42057f3cce150ec8a44 | AntiSpoof | deployed | includes/AntiSpoofPreAuthenticationProvider.php | AntiSpoofPreAuthenticationProvider::getAuthenticationRequests( $action, array $options ) | function | /** @inheritDoc */
public function getAuthenticationRequests( $action, array $options ) {
$needed = false;
if ( $action == AuthManager::ACTION_CREATE ) {
$user = User::newFromName( $options['username'] ) ?: new User();
$needed = $this->antiSpoofAccounts &&
$this->permissionManager->userHasAnyRight( $user... |
15,160 | a6d67afcd7b14d3e00d3105d579e5d3d | swh:1:cnt:bc12feec93d655c85ea8810aae8d5ea01820a55f;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=144-146/ | 0bb17163aabbb45fdb99e42057f3cce150ec8a44 | AntiSpoof | deployed | includes/AntiSpoofPreAuthenticationProvider.php | AntiSpoofPreAuthenticationProvider::getSpoofUser( UserIdentity $user ) | function | protected function getSpoofUser( UserIdentity $user ): SpoofUser {
return new SpoofUser( $user->getName() );
} |
15,161 | d34e3fa60e38be30a9fc53e885303310 | swh:1:cnt:d0c0a35c93de7c0abd1cc64fe3519422107e22c9;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=26-96/ | a79155e9bd59a65b03dcd64983e9aceb22809f3f | AntiSpoof | deployed | includes/ApiAntiSpoof.php | ApiAntiSpoof | type | /**
* API module to check a username against the AntiSpoof normalisation checks
*
* @ingroup API
* @ingroup Extensions
*/
class ApiAntiSpoof extends ApiBase {
public function execute() {
$params = $this->extractRequestParams();
$res = $this->getResult();
$res->addValue( null, $this->getModuleName(), [ 'us... |
15,162 | 48c7722bd9a93249526feb4da233d9ab | swh:1:cnt:d0c0a35c93de7c0abd1cc64fe3519422107e22c9;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=34-78/ | a79155e9bd59a65b03dcd64983e9aceb22809f3f | AntiSpoof | deployed | includes/ApiAntiSpoof.php | ApiAntiSpoof::execute() | function | public function execute() {
$params = $this->extractRequestParams();
$res = $this->getResult();
$res->addValue( null, $this->getModuleName(), [ 'username' => $params['username'] ] );
$spoof = new SpoofUser( $params['username'] );
if ( $spoof->isLegal() ) {
$normalized = $spoof->getNormalized();
$res-... |
15,163 | 1aeb58e8877f455d146b43c7f3556033 | swh:1:cnt:d0c0a35c93de7c0abd1cc64fe3519422107e22c9;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=80-87/ | a79155e9bd59a65b03dcd64983e9aceb22809f3f | AntiSpoof | deployed | includes/ApiAntiSpoof.php | ApiAntiSpoof::getAllowedParams() | function | /** @inheritDoc */
public function getAllowedParams() {
return [
'username' => [
ParamValidator::PARAM_REQUIRED => true,
],
];
} |
15,164 | 2189584cd2e703faf093bbd918b4738c | swh:1:cnt:d0c0a35c93de7c0abd1cc64fe3519422107e22c9;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=89-95/ | a79155e9bd59a65b03dcd64983e9aceb22809f3f | AntiSpoof | deployed | includes/ApiAntiSpoof.php | ApiAntiSpoof::getExamplesMessages() | function | /** @inheritDoc */
protected function getExamplesMessages() {
return [
'action=antispoof&username=Foo'
=> 'apihelp-antispoof-example-1',
];
} |
15,165 | d38cc40da8a6fb39b435cf31ef4949ee | swh:1:cnt:39af34730e4f6d07990b4767fa416bf78f5732d2;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=25-63/ | ca2667ca67f40cf89c60d25fa35bec4a7699dd89 | AntiSpoof | deployed | includes/Hooks.php | Hooks | type | class Hooks implements
LocalUserCreatedHook,
RenameUserCompleteHook
{
public static function onRegistration() {
global $wgGrantRiskGroups;
// Make sure the risk rating is at least 'security'. AntiSpoof adds the
// override-antispoof right to the createaccount grant, which makes it possible
// to use it for ... |
15,166 | 0060d9aaba393666433cb120a1226f6d | swh:1:cnt:39af34730e4f6d07990b4767fa416bf78f5732d2;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=30-38/ | ca2667ca67f40cf89c60d25fa35bec4a7699dd89 | AntiSpoof | deployed | includes/Hooks.php | Hooks::onRegistration() | function | public static function onRegistration() {
global $wgGrantRiskGroups;
// Make sure the risk rating is at least 'security'. AntiSpoof adds the
// override-antispoof right to the createaccount grant, which makes it possible
// to use it for social engineering attacks with lookalike usernames.
if ( $wgGrantRiskGr... |
15,167 | 9b4cbc55e8534b78fa849f964ebae8d3 | swh:1:cnt:39af34730e4f6d07990b4767fa416bf78f5732d2;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=53-62/ | ca2667ca67f40cf89c60d25fa35bec4a7699dd89 | AntiSpoof | deployed | includes/Hooks.php | Hooks::onRenameUserComplete( int $uid, string $old, string $new ) | function | /**
* On rename, remove the old entry and add the new
* (After a successful user rename)
*
* @inheritDoc
*/
public function onRenameUserComplete( int $uid, string $old, string $new ): void {
$spoof = new SpoofUser( $new );
$spoof->update( $old );
} |
15,168 | 12d76f2daf940decbf8a04a5c509a59a | swh:1:cnt:39af34730e4f6d07990b4767fa416bf78f5732d2;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=40-51/ | ca2667ca67f40cf89c60d25fa35bec4a7699dd89 | AntiSpoof | deployed | includes/Hooks.php | Hooks::onLocalUserCreated( $user, $autocreated ) | function | /**
* On new account creation, record the username's thing-bob.
* Replaces AddNewAccountHook for more modern MediaWiki versions-
*
* @inheritDoc
*/
public function onLocalUserCreated( $user, $autocreated ) {
if ( !$user->isTemp() ) {
$spoof = new SpoofUser( $user->getName() );
$spoof->record();
}
... |
15,169 | cdc26723c27cfa826ef4d6c59abe0173 | swh:1:cnt:5301550432371d7af9333463259843c610c0da0d;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=23-38/ | fa5bb88b0e3c0d7f39a614d56c4e65d987f9aeea | AntiSpoof | deployed | includes/SchemaHooks.php | SchemaHooks | type | class SchemaHooks implements LoadExtensionSchemaUpdatesHook {
/** @inheritDoc */
public function onLoadExtensionSchemaUpdates( $updater ) {
$type = $updater->getDB()->getType();
$updater->addExtensionTable( 'spoofuser',
__DIR__ . '/../sql/' . $type . '/tables-generated.sql' );
if ( $type === 'mysql' ) {
... |
15,170 | fe26e15bc0a4493a5f209433dbb6d1aa | swh:1:cnt:5301550432371d7af9333463259843c610c0da0d;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=24-37/ | fa5bb88b0e3c0d7f39a614d56c4e65d987f9aeea | AntiSpoof | deployed | includes/SchemaHooks.php | SchemaHooks::onLoadExtensionSchemaUpdates( $updater ) | function | /** @inheritDoc */
public function onLoadExtensionSchemaUpdates( $updater ) {
$type = $updater->getDB()->getType();
$updater->addExtensionTable( 'spoofuser',
__DIR__ . '/../sql/' . $type . '/tables-generated.sql' );
if ( $type === 'mysql' ) {
$updater->renameExtensionIndex( 'spoofuser', 'su_normalized', '... |
15,171 | e22fdfbe46371735494abca71d1ee247 | swh:1:cnt:22da3c2e2a5050cd0ae38f682e0eb80f9af8afb3;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=26-180/ | 96876b209b79e5d31688b5d0d7557cbc7391595b | AntiSpoof | deployed | includes/SpoofUser.php | SpoofUser | type | class SpoofUser {
private bool $legal;
private ?string $normalized;
private ?Status $error;
public function __construct(
private readonly string $name
) {
$status = AntiSpoof::checkUnicodeStringStatus( $this->name );
$this->legal = $status->isOK();
if ( $this->legal ) {
$this->normalized = $status->g... |
15,172 | 90a8fb122356d75a9f1b8ea0005178a0 | swh:1:cnt:22da3c2e2a5050cd0ae38f682e0eb80f9af8afb3;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=33-45/ | 96876b209b79e5d31688b5d0d7557cbc7391595b | AntiSpoof | deployed | includes/SpoofUser.php | SpoofUser::__construct(
private readonly string $name
) | function | public function __construct(
private readonly string $name
) {
$status = AntiSpoof::checkUnicodeStringStatus( $this->name );
$this->legal = $status->isOK();
if ( $this->legal ) {
$this->normalized = $status->getValue();
$this->error = null;
} else {
$this->normalized = null;
$this->error = $statu... |
15,173 | 35e40798ad65ef03c6ae40b1599f4316 | swh:1:cnt:22da3c2e2a5050cd0ae38f682e0eb80f9af8afb3;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=47-52/ | 96876b209b79e5d31688b5d0d7557cbc7391595b | AntiSpoof | deployed | includes/SpoofUser.php | SpoofUser::isLegal() | function | /**
* Does the username pass Unicode legality and script-mixing checks?
*/
public function isLegal(): bool {
return $this->legal;
} |
15,174 | 6f927bb4d2956c5b50bbcd00fe014065 | swh:1:cnt:22da3c2e2a5050cd0ae38f682e0eb80f9af8afb3;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=54-60/ | 96876b209b79e5d31688b5d0d7557cbc7391595b | AntiSpoof | deployed | includes/SpoofUser.php | SpoofUser::getErrorStatus() | function | /**
* Describe the error.
* @since 1.32
*/
public function getErrorStatus(): ?Status {
return $this->error;
} |
15,175 | 3278902c2dca459f75972cb57509352c | swh:1:cnt:22da3c2e2a5050cd0ae38f682e0eb80f9af8afb3;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=62-67/ | 96876b209b79e5d31688b5d0d7557cbc7391595b | AntiSpoof | deployed | includes/SpoofUser.php | SpoofUser::getNormalized() | function | /**
* Get the normalized key form
*/
public function getNormalized(): ?string {
return $this->normalized;
} |
15,176 | 85a239cb3fb2450ce5ab0e0547b95bbf | swh:1:cnt:22da3c2e2a5050cd0ae38f682e0eb80f9af8afb3;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=69-71/ | 96876b209b79e5d31688b5d0d7557cbc7391595b | AntiSpoof | deployed | includes/SpoofUser.php | SpoofUser::getTableName() | function | protected function getTableName(): string {
return 'user';
} |
15,177 | 4a5fc38cc11ce1e2124c5b8ee096894c | swh:1:cnt:22da3c2e2a5050cd0ae38f682e0eb80f9af8afb3;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=73-75/ | 96876b209b79e5d31688b5d0d7557cbc7391595b | AntiSpoof | deployed | includes/SpoofUser.php | SpoofUser::getUserColumn() | function | protected function getUserColumn(): string {
return 'user_name';
} |
15,178 | 42826e2b6f69b7e7179ccfb31c5166a4 | swh:1:cnt:22da3c2e2a5050cd0ae38f682e0eb80f9af8afb3;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=77-99/ | 96876b209b79e5d31688b5d0d7557cbc7391595b | AntiSpoof | deployed | includes/SpoofUser.php | SpoofUser::getConflicts() | function | /**
* Does the username pass Unicode legality and script-mixing checks?
*
* @return string[] empty if no conflict, or array containing conflicting usernames
*/
public function getConflicts(): array {
if ( !$this->isLegal() ) {
return [];
}
$dbr = $this->getDBReplica();
// Join against the user tab... |
15,179 | ee6c6032d467f657c2df64acc161a880 | swh:1:cnt:22da3c2e2a5050cd0ae38f682e0eb80f9af8afb3;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=101-107/ | 96876b209b79e5d31688b5d0d7557cbc7391595b | AntiSpoof | deployed | includes/SpoofUser.php | SpoofUser::record() | function | /**
* Record the username's normalized form into the database
* for later comparison of future names...
*/
public function record(): bool {
return self::batchRecord( $this->getDBPrimary(), [ $this ] );
} |
15,180 | 1d2e9aa6f598b3cf03491aa1ec1f3280 | swh:1:cnt:22da3c2e2a5050cd0ae38f682e0eb80f9af8afb3;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=109-116/ | 96876b209b79e5d31688b5d0d7557cbc7391595b | AntiSpoof | deployed | includes/SpoofUser.php | SpoofUser::insertFields() | function | private function insertFields(): array {
return [
'su_name' => $this->name,
'su_normalized' => $this->normalized,
'su_legal' => $this->legal ? 1 : 0,
'su_error' => $this->error?->getMessage()->text(),
];
} |
15,181 | df28244620048e4eb0744b3af11abbe3 | swh:1:cnt:22da3c2e2a5050cd0ae38f682e0eb80f9af8afb3;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=118-137/ | 96876b209b79e5d31688b5d0d7557cbc7391595b | AntiSpoof | deployed | includes/SpoofUser.php | SpoofUser::batchRecord( IDatabase $dbw, array $items ) | function | /**
* Insert a batch of spoof normalization records into the database.
* @param IDatabase $dbw
* @param self[] $items
* @return bool
*/
public static function batchRecord( IDatabase $dbw, array $items ): bool {
if ( !count( $items ) ) {
return false;
}
$rqb = $dbw->newReplaceQueryBuilder()
->rep... |
15,182 | 7d08a29084c971441d83956930b99be3 | swh:1:cnt:22da3c2e2a5050cd0ae38f682e0eb80f9af8afb3;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=139-154/ | 96876b209b79e5d31688b5d0d7557cbc7391595b | AntiSpoof | deployed | includes/SpoofUser.php | SpoofUser::update( string $oldName ) | function | public function update( string $oldName ): void {
$method = __METHOD__;
$dbw = $this->getDBPrimary();
// Avoid user rename triggered deadlocks
$dbw->onTransactionPreCommitOrIdle(
function () use ( $dbw, $method, $oldName ) {
if ( $this->record() ) {
$dbw->newDeleteQueryBuilder()
->deleteFrom( ... |
15,183 | e79b85a96d40d289b7a1f8f5bfb1357a | swh:1:cnt:22da3c2e2a5050cd0ae38f682e0eb80f9af8afb3;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=156-165/ | 96876b209b79e5d31688b5d0d7557cbc7391595b | AntiSpoof | deployed | includes/SpoofUser.php | SpoofUser::remove() | function | /**
* Remove a user from the spoofuser table
*/
public function remove(): void {
$this->getDBPrimary()
->newDeleteQueryBuilder()
->deleteFrom( 'spoofuser' )
->where( [ 'su_name' => $this->name ] )
->caller( __METHOD__ )->execute();
} |
15,184 | 70fc91061bda6ad18944459d59e37a1e | swh:1:cnt:22da3c2e2a5050cd0ae38f682e0eb80f9af8afb3;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=167-172/ | 96876b209b79e5d31688b5d0d7557cbc7391595b | AntiSpoof | deployed | includes/SpoofUser.php | SpoofUser::getDBReplica() | function | /**
* Allows overriding the database connection in sub-classes.
*/
protected function getDBReplica(): IReadableDatabase {
return MediaWikiServices::getInstance()->getConnectionProvider()->getReplicaDatabase();
} |
15,185 | 0ddf36a78473d0a2d4b119148cf9adaa | swh:1:cnt:22da3c2e2a5050cd0ae38f682e0eb80f9af8afb3;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=174-179/ | 96876b209b79e5d31688b5d0d7557cbc7391595b | AntiSpoof | deployed | includes/SpoofUser.php | SpoofUser::getDBPrimary() | function | /**
* Allows overriding database connection in sub-classes.
*/
protected function getDBPrimary(): IDatabase {
return MediaWikiServices::getInstance()->getConnectionProvider()->getPrimaryDatabase();
} |
15,186 | 503d656ebf5da4e65e86fd1dde9e8f7a | swh:1:cnt:1db52cc3a840c88573bdc032ba5245e06e7eb4d0;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=24-33/ | 11fd2133e14ab2a7cdcae70f58e63fe52f4736fe | AntiSpoof | deployed | includes/UserMergeHooks.php | UserMergeHooks | type | /**
* All hooks from the UserMerge extension which is optional to use with this extension.
*/
class UserMergeHooks implements DeleteAccountHook {
/** @inheritDoc */
public function onDeleteAccount( User &$oldUser ): void {
$spoof = new SpoofUser( $oldUser->getName() );
$spoof->remove();
}
} |
15,187 | 7765b211ae03252c9ad01bd620c25a6d | swh:1:cnt:1db52cc3a840c88573bdc032ba5245e06e7eb4d0;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=28-32/ | 11fd2133e14ab2a7cdcae70f58e63fe52f4736fe | AntiSpoof | deployed | includes/UserMergeHooks.php | UserMergeHooks::onDeleteAccount( User &$oldUser ) | function | /** @inheritDoc */
public function onDeleteAccount( User &$oldUser ): void {
$spoof = new SpoofUser( $oldUser->getName() );
$spoof->remove();
} |
15,188 | 26e95605a2815a9e5492530697845f2b | swh:1:cnt:2d2809e799b2a82c289b097bc876b0f412eda384;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=29-101/ | bcecdd87a12be0af5840a07fa61451f496654ed0 | AntiSpoof | deployed | maintenance/BatchAntiSpoofClass.php | BatchAntiSpoof | type | // phpcs:disable MediaWiki.Files.ClassMatchesFilename.NotMatch
/**
* Go through all usernames and calculate and record spoof thingies
*/
class BatchAntiSpoof extends Maintenance {
public function __construct() {
parent::__construct();
$this->requireExtension( 'AntiSpoof' );
$this->setBatchSize( 1000 );
}
... |
15,189 | f0fbb00852f81c9137fee469f91cc934 | swh:1:cnt:2d2809e799b2a82c289b097bc876b0f412eda384;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=36-41/ | bcecdd87a12be0af5840a07fa61451f496654ed0 | AntiSpoof | deployed | maintenance/BatchAntiSpoofClass.php | BatchAntiSpoof::__construct() | function | public function __construct() {
parent::__construct();
$this->requireExtension( 'AntiSpoof' );
$this->setBatchSize( 1000 );
} |
15,190 | 2cef8530f131f225cdac17c3ba03ffe9 | swh:1:cnt:2d2809e799b2a82c289b097bc876b0f412eda384;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=55-60/ | bcecdd87a12be0af5840a07fa61451f496654ed0 | AntiSpoof | deployed | maintenance/BatchAntiSpoofClass.php | BatchAntiSpoof::getPrimaryKey() | function | /**
* @return string Primary key of the table returned by getTableName()
*/
protected function getPrimaryKey(): string {
return 'user_id';
} |
15,191 | 4a5fc38cc11ce1e2124c5b8ee096894c | swh:1:cnt:2d2809e799b2a82c289b097bc876b0f412eda384;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=51-53/ | bcecdd87a12be0af5840a07fa61451f496654ed0 | AntiSpoof | deployed | maintenance/BatchAntiSpoofClass.php | BatchAntiSpoof::getUserColumn() | function | protected function getUserColumn(): string {
return 'user_name';
} |
15,192 | 85a239cb3fb2450ce5ab0e0547b95bbf | swh:1:cnt:2d2809e799b2a82c289b097bc876b0f412eda384;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=47-49/ | bcecdd87a12be0af5840a07fa61451f496654ed0 | AntiSpoof | deployed | maintenance/BatchAntiSpoofClass.php | BatchAntiSpoof::getTableName() | function | protected function getTableName(): string {
return 'user';
} |
15,193 | e53ab18773e9a31fcfc7a917fcff6170 | swh:1:cnt:2d2809e799b2a82c289b097bc876b0f412eda384;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=43-45/ | bcecdd87a12be0af5840a07fa61451f496654ed0 | AntiSpoof | deployed | maintenance/BatchAntiSpoofClass.php | BatchAntiSpoof::batchRecord( array $items ) | function | protected function batchRecord( array $items ): void {
SpoofUser::batchRecord( $this->getDB( DB_PRIMARY ), $items );
} |
15,194 | 381c61a378439ce28798700147ac6fab | swh:1:cnt:2d2809e799b2a82c289b097bc876b0f412eda384;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=62-64/ | bcecdd87a12be0af5840a07fa61451f496654ed0 | AntiSpoof | deployed | maintenance/BatchAntiSpoofClass.php | BatchAntiSpoof::makeSpoofUser( string $name ) | function | protected function makeSpoofUser( string $name ): SpoofUser {
return new SpoofUser( $name );
} |
15,195 | 3152d550a1cd4b00f2f3b36cf10f0a56 | swh:1:cnt:2d2809e799b2a82c289b097bc876b0f412eda384;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=66-100/ | bcecdd87a12be0af5840a07fa61451f496654ed0 | AntiSpoof | deployed | maintenance/BatchAntiSpoofClass.php | BatchAntiSpoof::execute() | function | /**
* Do the actual work. All child classes will need to implement this
*/
public function execute() {
$this->output( "Creating username spoofs...\n" );
$userCol = $this->getUserColumn();
$iterator = new BatchRowIterator( $this->getDB( DB_PRIMARY ),
$this->getTableName(),
$this->getPrimaryKey(),
$t... |
15,196 | 61206111fa61658bb301b8f2870e8230 | swh:1:cnt:0f1b0fdf74fbd341ee4a39473d278530aa8cf7de;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=6-22/ | 4578b29b1da9abd0b7069e7c5153e2dacf515004 | AntiSpoof | deployed | tests/phpunit/AntiSpoofAuthenticationRequestTest.php | AntiSpoofAuthenticationRequestTest | type | /**
* @covers \MediaWiki\Extension\AntiSpoof\AntiSpoofAuthenticationRequest
*/
class AntiSpoofAuthenticationRequestTest extends AuthenticationRequestTestCase {
/** @inheritDoc */
protected function getInstance( array $args = [] ) {
return new AntiSpoofAuthenticationRequest();
}
public static function provideL... |
15,197 | 16581ece4431f912c6eaa756298a87f6 | swh:1:cnt:0f1b0fdf74fbd341ee4a39473d278530aa8cf7de;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=11-14/ | 4578b29b1da9abd0b7069e7c5153e2dacf515004 | AntiSpoof | deployed | tests/phpunit/AntiSpoofAuthenticationRequestTest.php | AntiSpoofAuthenticationRequestTest::getInstance( array $args = [] ) | function | /** @inheritDoc */
protected function getInstance( array $args = [] ) {
return new AntiSpoofAuthenticationRequest();
} |
15,198 | 794158a799b5f0bd19a6d279b07b4f8a | swh:1:cnt:0f1b0fdf74fbd341ee4a39473d278530aa8cf7de;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=16-21/ | 4578b29b1da9abd0b7069e7c5153e2dacf515004 | AntiSpoof | deployed | tests/phpunit/AntiSpoofAuthenticationRequestTest.php | AntiSpoofAuthenticationRequestTest::provideLoadFromSubmission() | function | public static function provideLoadFromSubmission() {
return [
'empty' => [ [], [], [ 'ignoreAntiSpoof' => false ] ],
'true' => [ [], [ 'ignoreAntiSpoof' => '1' ], [ 'ignoreAntiSpoof' => true ] ],
];
} |
15,199 | eaa36fecb2e73afb5b30eb7da24ff3d6 | swh:1:cnt:0cc3bbb010e3346cfd9b6c445f52c1c38378abbf;origin=https://gerrit.wikimedia.org/r/mediawiki/extensions/AntiSpoof.git;lines=11-102/ | d5855993c041fbfa72d2cf435c2092cf2535e1e9 | AntiSpoof | deployed | tests/phpunit/AntiSpoofPreAuthenticationProviderTest.php | AntiSpoofPreAuthenticationProviderTest | type | /**
* @covers \MediaWiki\Extension\AntiSpoof\AntiSpoofPreAuthenticationProvider
* @group Database
*/
class AntiSpoofPreAuthenticationProviderTest extends MediaWikiIntegrationTestCase {
use AuthenticationProviderTestTrait;
/**
* @dataProvider provideGetAuthenticationRequests
*/
public function testGetAuthenti... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.