Skip to content

Add SSH key field validation in UserPreferences to ensure keys are correctly entered - #23739

Merged
SkorikSergey merged 1 commit into
mainfrom
verifySshKeyCorrectness
Feb 10, 2026
Merged

SkorikSergey merged 1 commit into
mainfrom
verifySshKeyCorrectness

Conversation

@SkorikSergey

@SkorikSergey SkorikSergey commented Feb 10, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

When adding SSH keys via addSshKeysFromStrings method in UserPreferences.ts, there was no verification that the keys were actually entered correctly into the form fields. This could lead to silent failures where the keys appeared to be added but were actually incomplete or corrupted.

Solution
Added validation after pasting each SSH key to verify the field values match the expected input.
If validation fails, an error is thrown with a descriptive message. On success, a confirmation log message is written.

Screenshot/screencast of this PR

What issues does this PR fix or reference?

https://issues.redhat.com/browse/CRW-10117

How to test this PR?

PR Checklist

As the author of this Pull Request I made sure that:

Reviewers

Reviewers, please comment how you tested the PR when approving it.

@SkorikSergey SkorikSergey self-assigned this Feb 10, 2026
@SkorikSergey
SkorikSergey marked this pull request as ready for review February 10, 2026 13:25

@dmytro-ndp dmytro-ndp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to merge.

@SkorikSergey
SkorikSergey merged commit dfcc9c3 into main Feb 10, 2026
5 checks passed
@SkorikSergey
SkorikSergey deleted the verifySshKeyCorrectness branch February 10, 2026 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants