Browse Source

SCA with Php Inspections (EA Ultimate)

tags/2.0.14.2
Vladimir Reznichenko 7 years ago
parent
commit
f9b03dfd42
  1. 4
      framework/captcha/Captcha.php
  2. 2
      framework/captcha/CaptchaAction.php
  3. 2
      framework/console/controllers/AssetController.php
  4. 2
      framework/helpers/BaseConsole.php
  5. 2
      framework/views/errorHandler/error.php
  6. 2
      framework/web/MultipartFormDataParser.php

4
framework/captcha/Captcha.php

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

2
framework/captcha/CaptchaAction.php

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

2
framework/console/controllers/AssetController.php

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

2
framework/helpers/BaseConsole.php

@ -622,7 +622,7 @@ class BaseConsole
if (static::isRunningOnWindows()) {
$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])];
}
} else {

2
framework/views/errorHandler/error.php

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

2
framework/web/MultipartFormDataParser.php

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

Loading…
Cancel
Save