Legoktm has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/396564 )
Change subject: Fix some typos ...................................................................... Fix some typos Change-Id: Ic69098f3ad46c47c538cf30cdba2c215e90b1511 --- M GenericSecurityCheckPlugin.php M MediaWikiSecurityCheckPlugin.php M src/MWVisitor.php M src/SecurityCheckPlugin.php M src/TaintednessBaseVisitor.php M src/TaintednessVisitor.php 6 files changed, 38 insertions(+), 38 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/phan/SecurityCheckPlugin refs/changes/64/396564/1 diff --git a/GenericSecurityCheckPlugin.php b/GenericSecurityCheckPlugin.php index f383c31..dc5d217 100644 --- a/GenericSecurityCheckPlugin.php +++ b/GenericSecurityCheckPlugin.php @@ -3,8 +3,8 @@ * This is phan plugin to provide security static analysis checks for php * * If your project has functions/methods whose output you - * specificly need to mark tainted, then you probably - * want to make your own subcalss of SecurityCheckPlugin + * specifically need to mark tainted, then you probably + * want to make your own subclass of SecurityCheckPlugin * and override getCustomFuncTaint(). * * See MediaWikiSecurityCheckPlugin for an example of that. diff --git a/MediaWikiSecurityCheckPlugin.php b/MediaWikiSecurityCheckPlugin.php index c8a1a22..e90b51f 100644 --- a/MediaWikiSecurityCheckPlugin.php +++ b/MediaWikiSecurityCheckPlugin.php @@ -658,7 +658,7 @@ } /** - * Mark XSS's that happen in a Maintinance subclass as false a positive + * Mark XSS's that happen in a Maintenance subclass as false a positive * * @param int $lhsTaint The dangerous taints to be output (e.g. LHS of assignment) * @param int $rhsTaint The taint of the expression diff --git a/src/MWVisitor.php b/src/MWVisitor.php index 1abacf6..8c4b1b0 100644 --- a/src/MWVisitor.php +++ b/src/MWVisitor.php @@ -687,7 +687,7 @@ * * @param Node $node * @note This assumes $wgHooks is always the global - * even if there is no globals decleration. + * even if there is no globals declaration. */ public function visitAssign( Node $node ) { $var = $node->children['var']; diff --git a/src/SecurityCheckPlugin.php b/src/SecurityCheckPlugin.php index 45778a6..2c2f1ad 100644 --- a/src/SecurityCheckPlugin.php +++ b/src/SecurityCheckPlugin.php @@ -33,10 +33,10 @@ // to the variable in question. const NO_TAINT = 0; - // For decleration type things. Given a special value for + // For declaration type things. Given a special value for // debugging purposes, but inapplicable taint should not // actually show up anywhere. - const INAPLICABLE_TAINT = 1; + const INAPPLICABLE_TAINT = 1; // Flag to denote that we don't know const UNKNOWN_TAINT = 2; // Flag for function parameters and the like, where it diff --git a/src/TaintednessBaseVisitor.php b/src/TaintednessBaseVisitor.php index 550b441..ab31b09 100644 --- a/src/TaintednessBaseVisitor.php +++ b/src/TaintednessBaseVisitor.php @@ -336,7 +336,7 @@ * the TAINT flags are what taint the output has * For numeric keys: EXEC flags for what taints are unsafe here * TAINT flags for what taint gets passed through func. - * If func has an arg that is mssing from array, then it should be + * If func has an arg that is missing from array, then it should be * treated as TAINT_NO if its a number or bool. TAINT_YES otherwise. * @suppress PhanUndeclaredMethod */ @@ -988,7 +988,7 @@ /** * Convert the yes taint bits to corresponding exec taint bits. * - * Any UNKNOWN_TAINT or INAPLICABLE_TAINT is discarded. + * Any UNKNOWN_TAINT or INAPPLICABLE_TAINT is discarded. * * @param int $taint * @return int The converted taint @@ -1000,7 +1000,7 @@ /** * Convert exec to yes taint * - * Special flags like UNKNOWN or INAPLICABLE are discarded. + * Special flags like UNKNOWN or INAPPLICABLE are discarded. * Any YES flags are also discarded * * @param int $taint The taint in question diff --git a/src/TaintednessVisitor.php b/src/TaintednessVisitor.php index 1c4a169..24c4f44 100644 --- a/src/TaintednessVisitor.php +++ b/src/TaintednessVisitor.php @@ -39,7 +39,7 @@ * this does for now. * * This also maintains some other properties, such as where the error - * originates, and dependencies in certaint cases. + * originates, and dependencies in certain cases. */ class TaintednessVisitor extends TaintednessBaseVisitor { @@ -100,7 +100,7 @@ // some issues in the inbetween period. $this->setFuncTaint( $method, [ 'overall' => SecurityCheckPlugin::NO_TAINT ] ); } - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } // No-ops we ignore. @@ -112,7 +112,7 @@ * @return int Taint */ public function visitStmtList( Node $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -120,7 +120,7 @@ * @return int Taint */ public function visitUseElem( Node $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -128,7 +128,7 @@ * @return int Taint */ public function visitType( Node $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -136,7 +136,7 @@ * @return int Taint */ public function visitArgList( Node $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -144,7 +144,7 @@ * @return int Taint */ public function visitParamList( Node $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -153,7 +153,7 @@ * @return int Taint */ public function visitParam( Node $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -161,7 +161,7 @@ * @return int Taint */ public function visitClass( Decl $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -169,7 +169,7 @@ * @return int Taint */ public function visitClassConstDecl( Node $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -177,7 +177,7 @@ * @return int Taint */ public function visitIf( Node $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -185,7 +185,7 @@ * @return int Taint */ public function visitThrow( Node $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -194,7 +194,7 @@ * @return int Taint */ public function visitPropDecl( Node $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -202,7 +202,7 @@ * @return int Taint */ public function visitConstElem( Node $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -210,7 +210,7 @@ * @return int Taint */ public function visitUse( Node $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -218,7 +218,7 @@ * @return int Taint */ public function visitBreak( Node $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -226,7 +226,7 @@ * @return int Taint */ public function visitContinue( Node $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -234,7 +234,7 @@ * @return int Taint */ public function visitGoto( Node $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -242,7 +242,7 @@ * @return int Taint */ public function visitCatch( Node $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -250,7 +250,7 @@ * @return int Taint */ public function visitNamespace( Node $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -258,7 +258,7 @@ * @return int Taint */ public function visitSwitch( Node $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -266,7 +266,7 @@ * @return int Taint */ public function visitSwitchCase( Node $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -274,7 +274,7 @@ * @return int Taint */ public function visitWhile( Node $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -282,7 +282,7 @@ * @return int Taint */ public function visitUnset( Node $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -290,7 +290,7 @@ * @return int Taint */ public function visitTry( Node $node ) : int { - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -697,7 +697,7 @@ } /** - * A global decleration. Assume most globals are untainted. + * A global declaration. Assume most globals are untainted. * * @param Node $node * @return int Taint @@ -725,7 +725,7 @@ $localVar->taintedness =& $globalVar->taintedness; $localVar->taintednessHasOuterScope = true; } - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -774,7 +774,7 @@ ); } } - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** @@ -952,7 +952,7 @@ // $this->debug( __METHOD__, "Setting taint preserve if not set" // . " yet for \$" . $node->children['name'] . "" ); $this->setTaintedness( $prop, SecurityCheckPlugin::NO_TAINT, false ); - return SecurityCheckPlugin::INAPLICABLE_TAINT; + return SecurityCheckPlugin::INAPPLICABLE_TAINT; } /** -- To view, visit https://gerrit.wikimedia.org/r/396564 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic69098f3ad46c47c538cf30cdba2c215e90b1511 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/phan/SecurityCheckPlugin Gerrit-Branch: master Gerrit-Owner: Legoktm <lego...@member.fsf.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits