Skip to content

Conversation

@sheldor1510
Copy link
Collaborator

  • ssh key validation done with PublicKeyLoader
  • added ajax call for ssh key validation on textarea change
  • added red box shadow to textarea and disabled "Add Key" button if key is not valid
  • added ssh key validation code on the backend for both cases of paste and file import
  • Check ssh key format for 'paste' option.  #17

@sheldor1510 sheldor1510 requested a review from hakasapl February 15, 2023 00:08
Copy link
Collaborator

@hakasapl hakasapl left a comment

Choose a reason for hiding this comment

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

Some minor code cleanup changes, other than that this looks really good, thanks!

@sheldor1510
Copy link
Collaborator Author

sheldor1510 commented Feb 15, 2023

@hakasapl can you fix this one codesniffer warning? (rest of the checks are passing on my latest commit)

A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 5 and the first side effect is on line 15 (PSR1.Files.SideEffects.FoundWithSymbols)

@hakasapl
Copy link
Collaborator

Hi, it's complaining because the function can't be in this file. Could you make that a static function and put it in this file? https://github.com/UnityHPC/unity-web-portal/blob/main/resources/lib/UnitySite.php

That should resolve that issue, then you'll have to call the static function from the account page

@sheldor1510 sheldor1510 requested a review from hakasapl February 15, 2023 15:56
Copy link
Collaborator

@hakasapl hakasapl left a comment

Choose a reason for hiding this comment

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

Awesome!

@hakasapl hakasapl linked an issue Feb 15, 2023 that may be closed by this pull request
@hakasapl hakasapl merged commit 7c6712a into UnityHPC:main Feb 15, 2023
@sheldor1510 sheldor1510 deleted the ssh-validation branch February 15, 2023 17:43
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.

Check ssh key format for 'paste' option.

2 participants