Correctly clone RoleV6 when downgrading#35230
Conversation
|
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
|
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
3ab19c1 to
3351840
Compare
|
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
There was a problem hiding this comment.
It looks like I am still working on anomaly detection 😆
3351840 to
ff515b7
Compare
|
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
1 similar comment
|
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
Fix panic caused by improper clone of `RoleV6` when downgrading. This PR forces a clone before downgrading it. Fixes #35229 Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
ff515b7 to
840dbbd
Compare
| ) | ||
| downgraded = *r | ||
| var restricted bool | ||
| downgraded := apiutils.CloneProtoMsg(r) |
There was a problem hiding this comment.
This looks like quite an important change. We "probably" should add a test or at least a comment.
Backport #35230 to branch/v13 Changelog: Fixed a possible panic when downgrading Teleport Roles to older versions.
* [v13] Correctly clone RoleV6 when downgrading Backport #35230 to branch/v13 Changelog: Fixed a possible panic when downgrading Teleport Roles to older versions. * use golang.org/x/exp/maps
Fix panic caused by improper clone of
RoleV6when downgrading. This PR forces a clone before downgrading it.Fixes #35229
Changelog: Fixed a possible panic when downgrading Teleport Roles to older versions.