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

bug: Property Value Validation #28

Open
raamsri opened this issue Jan 5, 2025 · 0 comments
Open

bug: Property Value Validation #28

raamsri opened this issue Jan 5, 2025 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers Good to Have Non critical, and not priotirized yet. Needs Investigation The issue requires analysis to understand the root cause.

Comments

@raamsri
Copy link
Contributor

raamsri commented Jan 5, 2025

Bug Report

Description

Need to implement property value validation for ZFS operations

Current Behavior

  • Property values not fully validated
  • No tracking of valid ZFS properties
  • Validation delegated to ZFS commands
  • Quotations with the help of shellquote covers values that have spaces

Expected Behavior

  • Validate property names before operations
  • Track and validate against ZFS property list
  • Proper error messages for invalid properties
  • Clearly track possible, and acceptable, values for different properties.

Steps to Reproduce

  1. Set invalid property value
  2. Observe lack of proper validation
  3. Command fails at ZFS level

Setup

  • Component: ZFS Property Management
  • File: pkg/zfs/api/middleware.go
  • Function: ValidatePropertyValue()

Additional Context

This impacts reliability and security of ZFS property management

Notes/Suggestions

Implementation options:

  1. Maintain property whitelist
  2. Add property type validation
  3. Implement value format checking
  4. Add property documentation
@raamsri raamsri added bug Something isn't working good first issue Good for newcomers Needs Investigation The issue requires analysis to understand the root cause. Good to Have Non critical, and not priotirized yet. labels Jan 5, 2025
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 Good to Have Non critical, and not priotirized yet. Needs Investigation The issue requires analysis to understand the root cause.
Projects
None yet
Development

No branches or pull requests

1 participant