Skip to content

Commit

Permalink
Correctly handle empty username for Redis/RedisNg AUTH (#170)
Browse files Browse the repository at this point in the history
Signed-off-by: Reda <[email protected]>
  • Loading branch information
breda authored Dec 10, 2024
1 parent abe6bbb commit 3f8e4ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Prometheus/Storage/Redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ private function ensureOpenConnection(): void
$this->connectToServer();
$authParams = [];

if (isset($this->options['user'])) {
if (isset($this->options['user']) && $this->options['user'] !== '') {
$authParams[] = $this->options['user'];
}

Expand Down
2 changes: 1 addition & 1 deletion src/Prometheus/Storage/RedisNg.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ private function ensureOpenConnection(): void
$this->connectToServer();
$authParams = [];

if (isset($this->options['user'])) {
if (isset($this->options['user']) && $this->options['user'] !== '') {
$authParams[] = $this->options['user'];
}

Expand Down

0 comments on commit 3f8e4ff

Please sign in to comment.