Project

General

Profile

Actions

Bug #20890

closed

SSH key validations should return better messages

Added by Tomáš Strachota over 6 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Users, Roles and Permissions
Target version:
Difficulty:
trivial
Triaged:
Fixed in Releases:
Found in Releases:

Description

Creating an ssh key with invalid format results in following two messages:

Key is invalid
Key is invalid

It's caused by ssh_key and format validators:
https://github.com/theforeman/foreman/blob/develop/app/models/ssh_key.rb#L23-L24

The error messages should contain more information:

Key is not a valid public ssh key.
Key must be in OpenSSH public key format.

Actions

Also available in: Atom PDF