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

Broken validation of positional arguments. #2375

Closed
jan-podrouzek-brcm opened this issue Nov 22, 2024 · 2 comments · Fixed by #2384
Closed

Broken validation of positional arguments. #2375

jan-podrouzek-brcm opened this issue Nov 22, 2024 · 2 comments · Fixed by #2384
Assignees
Labels
bug Something isn't working good first issue Good for newcomers priority-medium Not functioning - next quarter if capacity permits severity-medium Bug where workaround exists or that doesn't prevent the usage of Zowe. Just makes it more complex.

Comments

@jan-podrouzek-brcm
Copy link

jan-podrouzek-brcm commented Nov 22, 2024

Describe the bug

Typo in the syntax validation code that is used to validate positional argument regex.
The validation never fails.

See the following code:

https://github.com/zowe/zowe-cli/blob/master/packages/imperative/src/cmd/src/syntax/SyntaxValidator.ts#L228-L229

The parenthesis enclosing the match method call is in the incorrect location.

Incorrect code:

                        if (commandArguments[positional.name]
                            .toString().match(new RegExp(positional.regex) == null)) {

Correct code:

                        if (commandArguments[positional.name]
                            .toString().match(new RegExp(positional.regex)) == null) {
@jan-podrouzek-brcm jan-podrouzek-brcm added bug Something isn't working new The issue wasn't triaged yet labels Nov 22, 2024
@github-project-automation github-project-automation bot moved this to New Issues in Zowe CLI Squad Nov 22, 2024
Copy link

Thank you for creating a bug report.
We will investigate the bug and evaluate its impact on the product.
If you haven't already, please ensure you have provided steps to reproduce the bug and as much context as possible.

@zFernand0 zFernand0 added good first issue Good for newcomers severity-medium Bug where workaround exists or that doesn't prevent the usage of Zowe. Just makes it more complex. labels Nov 25, 2024
@JTonda JTonda added priority-medium Not functioning - next quarter if capacity permits and removed new The issue wasn't triaged yet labels Dec 9, 2024
@zowe-robot zowe-robot moved this from New Issues to Medium Priority in Zowe CLI Squad Dec 9, 2024
@MAVRICK-1
Copy link
Contributor

@JTonda can you assign me this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers priority-medium Not functioning - next quarter if capacity permits severity-medium Bug where workaround exists or that doesn't prevent the usage of Zowe. Just makes it more complex.
Projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

4 participants