microsoft / microsoft/PowerPlatformConnectors

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

Open
#3,752 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
1.3k
Forks
1.5k
Avg merge
5d 15h
Merged PRs (30d)
11

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'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ConnectorPackageValidator.ps1 and reproduce the failure using PowerShell 7, the example absolute ZIP path, and the provided command. Compare path handling with the documented relative-path comments and classic PowerShell behavior; done means validation works with the supported PowerShell version and the required path format is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.