SCA with Php Inspections (EA Ultimate)

This commit is contained in:
Vladimir Reznichenko
2018-02-27 19:06:27 +01:00
parent 7c4474132e
commit f9b03dfd42
6 changed files with 7 additions and 7 deletions

View File

@ -107,9 +107,9 @@ class Captcha extends InputWidget
$input = $this->renderInputHtml('text'); $input = $this->renderInputHtml('text');
$route = $this->captchaAction; $route = $this->captchaAction;
if (is_array($route)) { if (is_array($route)) {
$route['v'] = uniqid(); $route['v'] = uniqid('', true);
} else { } else {
$route = [$route, 'v' => uniqid()]; $route = [$route, 'v' => uniqid('', true)];
} }
$image = Html::img($route, $this->imageOptions); $image = Html::img($route, $this->imageOptions);
echo strtr($this->template, [ echo strtr($this->template, [

View File

@ -132,7 +132,7 @@ class CaptchaAction extends Action
'hash2' => $this->generateValidationHash(strtolower($code)), 'hash2' => $this->generateValidationHash(strtolower($code)),
// we add a random 'v' parameter so that FireFox can refresh the image // we add a random 'v' parameter so that FireFox can refresh the image
// when src attribute of image tag is changed // when src attribute of image tag is changed
'url' => Url::to([$this->id, 'v' => uniqid()]), 'url' => Url::to([$this->id, 'v' => uniqid('', true)]),
]; ];
} }

View File

@ -484,7 +484,7 @@ class AssetController extends Controller
} }
} }
$array = VarDumper::export($array); $array = VarDumper::export($array);
$version = date('Y-m-d H:i:s', time()); $version = date('Y-m-d H:i:s');
$bundleFileContent = <<<EOD $bundleFileContent = <<<EOD
<?php <?php
/** /**

View File

@ -622,7 +622,7 @@ class BaseConsole
if (static::isRunningOnWindows()) { if (static::isRunningOnWindows()) {
$output = []; $output = [];
exec('mode con', $output); exec('mode con', $output);
if (isset($output, $output[1]) && strpos($output[1], 'CON') !== false) { if (isset($output[1]) && strpos($output[1], 'CON') !== false) {
return $size = [(int) preg_replace('~\D~', '', $output[4]), (int) preg_replace('~\D~', '', $output[3])]; return $size = [(int) preg_replace('~\D~', '', $output[4]), (int) preg_replace('~\D~', '', $output[3])];
} }
} else { } else {

View File

@ -78,7 +78,7 @@ if (method_exists($this, 'beginPage')) {
Please contact us if you think this is a server error. Thank you. Please contact us if you think this is a server error. Thank you.
</p> </p>
<div class="version"> <div class="version">
<?= date('Y-m-d H:i:s', time()) ?> <?= date('Y-m-d H:i:s') ?>
</div> </div>
<?php if (method_exists($this, 'endBody')): ?> <?php if (method_exists($this, 'endBody')): ?>
<?php $this->endBody() // to allow injecting code into body (mostly by Yii Debug Toolbar)?> <?php $this->endBody() // to allow injecting code into body (mostly by Yii Debug Toolbar)?>

View File

@ -219,7 +219,7 @@ class MultipartFormDataParser extends BaseObject implements RequestParserInterfa
$headers = []; $headers = [];
$headerParts = preg_split('/\\R/s', $headerContent, -1, PREG_SPLIT_NO_EMPTY); $headerParts = preg_split('/\\R/s', $headerContent, -1, PREG_SPLIT_NO_EMPTY);
foreach ($headerParts as $headerPart) { foreach ($headerParts as $headerPart) {
if (($separatorPos = strpos($headerPart, ':')) === false) { if (strpos($headerPart, ':') === false) {
continue; continue;
} }