Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
* develop:
  specify next release
  check the password is compatible with the user
  mention the property removal in the changelog
  remove the password being stored inside a string property
  • Loading branch information
Baptouuuu committed Oct 26, 2024
2 parents 560d67b + 522c10b commit d187d0c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 4.3.2 - 2024-10-26

### Fixed

- The password was still being visible inside the `Innmind\Url\Authority\UserInformation::$string` property. The property has been removed.

## 4.3.1 - 2024-10-19

### Changed
Expand Down
6 changes: 3 additions & 3 deletions src/Authority/UserInformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ final class UserInformation
{
private User $user;
private Password $password;
private string $string;

private function __construct(User $user, Password $password)
{
// Make sure a user is specified when a password is specified
$password->format($user);
$this->user = $user;
$this->password = $password;
$this->string = $password->format($user);
}

/**
Expand Down Expand Up @@ -86,6 +86,6 @@ public function format(Host $host): string

public function toString(): string
{
return $this->string;
return $this->password->format($this->user);
}
}

0 comments on commit d187d0c

Please sign in to comment.