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

fix(capabilities): update default shell command validator pattern #3021

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

akazwz
Copy link

@akazwz akazwz commented Nov 26, 2024

Description

fix(capabilities): update docs default shell command validator pattern

  • What does this PR change?
    Updates the default shell command validator pattern from \\S+ to * to better support common shell command patterns. This change allows:

    • Commands with spaces (e.g., echo 'Hello World!')
    • Commands with quotes
    • Other common shell command patterns

    This improvement enhances developer experience by allowing standard shell commands to work out of the box while maintaining security through the capabilities system.

The default validator pattern '\\S+' is too restrictive for common shell commands  as it doesn't allow spaces or special characters. This causes validation errors  when using commands like `echo 'Hello World!'`.

Changed the validator to '*' to support:
- Commands with spaces
- Commands with quotes
- Other common shell command patterns

This change improves developer experience by allowing standard shell commands  to work out of the box while maintaining security through the capabilities system.
@akazwz akazwz requested a review from a team as a code owner November 26, 2024 03:36
Copy link

netlify bot commented Nov 26, 2024

Deploy Preview for tauri-v2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit a0d74bf
🔍 Latest deploy log https://app.netlify.com/sites/tauri-v2/deploys/6745424ed490310008033adc
😎 Deploy Preview https://deploy-preview-3021--tauri-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 99 (🔴 down 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added i18n Is this related to translations? i18n: zh-cn Is this related to zh-cn translations? labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n: zh-cn Is this related to zh-cn translations? i18n Is this related to translations?
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant