Project

General

Profile

Actions

Bug #17691

closed

[Workbench2] the "add new ssh key" page does overly strict validation

Added by Ward Vandewege over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Story points:
-
Release relationship:
Auto

Description

The "Add new ssh key" form seems to require a key format that is "ssh-rsa thewholelongkey some-comment@something". If "some-comment@something" is not present, the user sees "Public key is invalid" in red, which is not true.

This form should not require a comment on the key.


Subtasks 1 (0 open1 closed)

Task #17959: Review 17681-relax-add-ssh-validationResolvedStephen Smith08/02/2021Actions
Actions #1

Updated by Ward Vandewege over 3 years ago

  • Description updated (diff)
Actions #2

Updated by Ward Vandewege over 3 years ago

  • Description updated (diff)
Actions #3

Updated by Ward Vandewege over 3 years ago

  • Release deleted (31)
  • Target version set to 2021-08-04 sprint
  • Assigned To set to Stephen Smith
Actions #4

Updated by Stephen Smith over 3 years ago

  • Status changed from New to In Progress
Actions #5

Updated by Stephen Smith over 3 years ago

Changes at 065273b6a85d33939edad2b25efaf7028610e1e4 - branch 17681-relax-add-ssh-validation
Tests: developer-tests-workbench2: #453

Updated the ssh key validation regex to accept either (at the end of the key)
  • Original pattern which requires a single space and comment containing @
    or
  • No whitespace at the end of the key

Since the comment validation wasn't mentioned, I assume the existing behavior in requiring something@something is ok
Keys without a comment must not have any trailing whitespace or other characters (hopefully that's not too strict)

Actions #6

Updated by Lucas Di Pentima over 3 years ago

  • Just one suggestion: Some unit tests could be easily added to check that isRsaKey() behaves correctly.

With that, it LGTM.

Actions #7

Updated by Stephen Smith over 3 years ago

  • Status changed from In Progress to Resolved

Added some tests and merged in fd49462a5a09e107b7bb5c0ef8635db328b399b8

Actions #8

Updated by Peter Amstutz over 3 years ago

  • Release set to 41
Actions

Also available in: Atom PDF