Skip to content

Commit 15e8f80

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into develop
2 parents ba9bab6 + 70d0a0e commit 15e8f80

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

.github/workflows/test-phpunit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ permissions:
77

88
jobs:
99
tests:
10-
runs-on: ubuntu-18.04
10+
runs-on: ubuntu-22.04
1111
if: "!contains(github.event.head_commit.message, '[ci skip]')"
1212
env:
1313
PHP_INI_VALUES: assert.exception=1, zend.assertions=1

system/helpers/captcha_helper.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,12 @@ function create_captcha($data)
297297
{
298298
$theta += $thetac;
299299
$rad = $radius * ($i / $points);
300-
$x = ($rad * cos($theta)) + $x_axis;
301-
$y = ($rad * sin($theta)) + $y_axis;
300+
$x = round(($rad * cos($theta)) + $x_axis);
301+
$y = round(($rad * sin($theta)) + $y_axis);
302302
$theta += $thetac;
303303
$rad1 = $radius * (($i + 1) / $points);
304-
$x1 = ($rad1 * cos($theta)) + $x_axis;
305-
$y1 = ($rad1 * sin($theta)) + $y_axis;
304+
$x1 = round(($rad1 * cos($theta)) + $x_axis);
305+
$y1 = round(($rad1 * sin($theta)) + $y_axis);
306306
imageline($im, $x, $y, $x1, $y1, $colors['grid']);
307307
$theta -= $thetac;
308308
}

tests/codeigniter/libraries/Encryption_test.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ class Encryption_test extends CI_TestCase {
55
public function set_up()
66
{
77
$this->encryption = new Mock_Libraries_Encryption();
8+
9+
if (version_compare(PHP_VERSION, '7.1', '<'))
10+
{
11+
$this->markTestSkipped('Ubuntu-latest OpenSSL is not working correct in some older PHP versions.');
12+
}
813
}
914

1015
// --------------------------------------------------------------------
@@ -207,8 +212,8 @@ public function test_initialize_encrypt_decrypt()
207212

208213
$this->assertEquals($message, $this->encryption->decrypt($this->encryption->encrypt($message)));
209214

210-
// Try DES in ECB mode, just for the sake of changing stuff
211-
$this->encryption->initialize(array('cipher' => 'des', 'mode' => 'ecb', 'key' => substr($key, 0, 8)));
215+
// Try DES3 in OFB mode, just for the sake of changing stuff
216+
$this->encryption->initialize(array('cipher' => 'tripledes', 'mode' => 'ofb', 'key' => substr($key, 0, 8)));
212217
$this->assertEquals($message, $this->encryption->decrypt($this->encryption->encrypt($message)));
213218
}
214219

0 commit comments

Comments
 (0)