Skip to content

Commit bbefc30

Browse files
committed
fix: tighten org ID regex to match only valid 15 or 18-char IDs
1 parent 53e7288 commit bbefc30

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/commands/package/bundle/install.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export class PackageBundlesInstall extends SfCommand<BundleSObjects.PkgBundleVer
7272
let devHubOrgId: string;
7373
// If the input already looks like a 15/18-char org ID starting with 00D, use it directly.
7474
// Otherwise resolve the alias or username through the auth store.
75-
if (/^00D[a-zA-Z0-9]{12,15}$/.test(devHubInput)) {
75+
if (/^00D[a-zA-Z0-9]{12}([a-zA-Z0-9]{3})?$/.test(devHubInput)) {
7676
devHubOrgId = devHubInput;
7777
} else {
7878
const devHubOrg = await Org.create({ aliasOrUsername: devHubInput });

0 commit comments

Comments
 (0)