Skip to content

Validate that SSH key file path is not a directory#966

Open
isc-pbarton wants to merge 1 commit into
mainfrom
configure-validate-ssh-key-file
Open

Validate that SSH key file path is not a directory#966
isc-pbarton wants to merge 1 commit into
mainfrom
configure-validate-ssh-key-file

Conversation

@isc-pbarton
Copy link
Copy Markdown
Collaborator

Description

Resolves #943

Adds validation to confirm the SSH key file path is not a directory when configuring Embedded Git, both through the Configure() prompt and the Settings page.

Testing

In the development container:

  • do ##class(SourceControl.Git.API).Configure() to go through the configuration prompts. When prompted for ssh key file path, put in /usr/irissys/mgr: the Configure prompt displays an informative error and quits out at the end. Try again with /usr/irissys/mgr/test_key.pub: at the end it prompts you to create the SSH key, and successfully does so.
  • Visit the settings page at http://localhost:52774/isc/studio/usertemplates/gitsourcecontrol/gitprojectsettings.csp and test directory and non-directory values in the "SSH Private Key File" input.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.10%. Comparing base (6438970) to head (6816e63).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #966   +/-   ##
=======================================
  Coverage   49.10%   49.10%           
=======================================
  Files          23       23           
  Lines        3287     3287           
=======================================
  Hits         1614     1614           
  Misses       1673     1673           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.


<server>
if (settings.privateKeyFile '= "") && fileExists {
if (settings.privateKeyFile '= "") && fileExists && '$$$ISERR(validateSC) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What's wrong with $$$ISOK()?

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.

Failure if SSH key file path is a directory

3 participants