Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Custom connector validator incompatible with Powershell 7 (and relative paths) #3752

Open
bw-tribal opened this issue Jan 13, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@bw-tribal
Copy link
Contributor

Type of Connector

Custom Connector

Name of Connector

Any

Describe the bug

Been trying to validator a connector and pulling out my hair are why it was failing validation and the script wasnt working as expected. debugged the validation script and fixed it myself to work but realised its being actively maintained and no one else complaining so i looked at it more and found the following issues.

  • only accepts absolute paths despite script mentioning relative paths in the code comments (at first i thought the issue below was because it had to be relative and tried getting relative to work with no luck)
  • does not work in powershell 7, causes issues with path reading of the extracted zips.

my fix worked for powershell 7 but not classic powershell.

I think simplest solution is to document in the script (ideally check as well) which powershell version to use and clarify with an example that an absolute path should be used

Is this a security bug?

No, this is not a security bug

What is the severity of this bug?

Severity 3 - Minor issue

To Reproduce

  • install powershell 7
  • get a valid connector and save at C:\Example\ConnectorPackage.zip
  • run validation script in powershell 7

example .\ConnectorPackageValidator.ps1 -zipFilePath "C:\Example\ConnectorPackage.zip" -isPluginEnabled "no"

Expected behavior

validation passes with no errors

Environment summary

CLI version: any
OS version: any
Shell Type: powershell 7

Additional context

the error that occurs with powershell 7 is the paths for the zips are concatenated and powershell cannot find them

example

Folder not found: C:\Users\USER~1.NAMI\AppData\Local\Temp\74d20974-dd05-43ab-9b1e-015ab2a4188c/C:\Users\user.name\AppData\Local\Temp\74d20974-dd05-43ab-9b1e-015ab2a4188c\PkgAssets while working with actual working folder path:'C:\Example\ConnectorPackage.zip\package.zip/C:\Users\user.name\AppData\Local\Temp\74d20974-dd05-43ab-9b1e-015ab2a4188c\PkgAssets'

@bw-tribal bw-tribal added the bug Something isn't working label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant