Skip to content

[v17] fix: fixes a possible panic during auth start if upsert operation fails#54327

Merged
tigrato merged 1 commit intobranch/v17from
bot/backport-54323-branch/v17
Apr 25, 2025
Merged

[v17] fix: fixes a possible panic during auth start if upsert operation fails#54327
tigrato merged 1 commit intobranch/v17from
bot/backport-54323-branch/v17

Conversation

@tigrato
Copy link
Copy Markdown
Contributor

@tigrato tigrato commented Apr 25, 2025

Backport #54323 to branch/v17

changelog: Fixed a potential panic during Auth Server startup when the backend returns an error.

This PR fixes a possible panic caused by a failure caused by a backend
failure. If the failure occurs, we replaced the user object with the
result of the `{Upsert|Create}User` operation. If the operation fails,
both calls return `nil, err` and when building the error stream, we
accessed a nil user.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
@tigrato tigrato added this pull request to the merge queue Apr 25, 2025
Merged via the queue into branch/v17 with commit 195b4b1 Apr 25, 2025
40 checks passed
@tigrato tigrato deleted the bot/backport-54323-branch/v17 branch April 25, 2025 20:49
EdwardDowling pushed a commit that referenced this pull request Apr 28, 2025
…ls (#54327)

This PR fixes a possible panic caused by a failure caused by a backend
failure. If the failure occurs, we replaced the user object with the
result of the `{Upsert|Create}User` operation. If the operation fails,
both calls return `nil, err` and when building the error stream, we
accessed a nil user.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
@fheinecke fheinecke mentioned this pull request Apr 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants