Description
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'