Skip to content

Commit

Permalink
Update Session.php
Browse files Browse the repository at this point in the history
  • Loading branch information
usernane committed Jan 15, 2024
1 parent cfb1e28 commit db767c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webfiori/framework/session/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public function deserialize(string $serialized): bool {
{
throw new SessionException($errStr, $errNo);
});
$sessionObj = unserialize(base64_decode(trim($decrypted)));
$sessionObj = unserialize(base64_decode($decrypted));

Check warning on line 230 in webfiori/framework/session/Session.php

View check run for this annotation

Codecov / codecov/patch

webfiori/framework/session/Session.php#L230

Added line #L230 was not covered by tests
restore_error_handler();

if ($sessionObj instanceof Session) {
Expand Down Expand Up @@ -586,7 +586,7 @@ public function remove(string $varName) : bool {
*/
public function serialize() : string {
// Serialize => Encode => [Encrypt]
$serializedSession = base64_encode(serialize($this));
$serializedSession = base64_encode(trim(serialize($this)));

Check warning on line 589 in webfiori/framework/session/Session.php

View check run for this annotation

Codecov / codecov/patch

webfiori/framework/session/Session.php#L589

Added line #L589 was not covered by tests
$cipherMeth = 'aes-256-ctr';

if (in_array($cipherMeth, openssl_get_cipher_methods())) {
Expand Down

0 comments on commit db767c9

Please sign in to comment.