Skip to content

Commit

Permalink
feat(openebs): poolname input validation (#21277)
Browse files Browse the repository at this point in the history
**Description**
Adds input validation to the poolname / dataset variable to prevent
users entering common invalid paths
- rejects leading `/`
- enforces at least one `/`
- rejects backslash `\` in the path
- rejects `ix-applications` in the path
- rejects `TANK` or `TANK/` entries

⚒️ Fixes  #21275 

**⚙️ Type of change**

- [x ] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
Tested via https://regex101.com/r/8aNdeE/1

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [x ] ⚖️ My code follows the style guidelines of this project
- [x ] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [ ] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [x ] ⬆️ I increased versions for any altered app according to semantic
versioning
- [ x] I made sure the title starts with `feat(chart-name):`,
`fix(chart-name):` or `chore(chart-name):`

**➕ App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._
  • Loading branch information
ksimm1 committed Apr 24, 2024
1 parent ea0a26e commit e5e6b97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/system/openebs/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ sources:
- https://github.com/truecharts/charts/tree/master/charts/system/openebs
- https://github.com/truecharts/containers/tree/master/apps/scratch
type: application
version: 4.3.11
version: 4.3.12
1 change: 1 addition & 0 deletions charts/system/openebs/questions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ questions:
schema:
type: string
default: ""
valid_chars: '^(?!.*\\)(?!.*ix-applications)[^\/]+(\/[^\/]+)+$'
required: true
- variable: fstype
label: "fstype"
Expand Down

0 comments on commit e5e6b97

Please sign in to comment.