Skip to content

Ensure key fingerprints are generated correctly when modified

Nick Thomas requested to merge (removed):fix-ssh-key-mutation into master

What does this MR do?

Backports a commit from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3012

When implementing https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/13712 , I believed there were no cases in which Key#key would be mutated - however, we are now adding a case that does exactly that.

When the key is mutated, a memoized value must be flushed or the key will be generated with an invalid fingerprint.

Are there points in the code the reviewer needs to double check?

Would it be better to remove the memoization entirely?

Why was this MR needed?

Avoid divergence between CE and EE

Screenshots (if relevant)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Edited by Nick Thomas

Merge request reports