Skip to content

fix: add name validation to CIRA config to prevent 500 on invalid con…#867

Merged
madhavilosetty-intel merged 1 commit intomainfrom
update-cira-name
Mar 30, 2026
Merged

fix: add name validation to CIRA config to prevent 500 on invalid con…#867
madhavilosetty-intel merged 1 commit intomainfrom
update-cira-name

Conversation

@madhavilosetty-intel
Copy link
Copy Markdown
Contributor

…figName

Enforce alphanumhyphenunderscore validation (^[a-zA-Z0-9_-]+$) on the in the name would pass through to downstream operations and cause a 500 Internal Server Error. With this change, invalid names are rejected at the validation layer with a proper 4xx error.

Resolves device-management-toolkit/rps#2599

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.25%. Comparing base (75d7f81) to head (6b295a1).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/controller/httpapi/router.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #867   +/-   ##
=======================================
  Coverage   40.24%   40.25%           
=======================================
  Files         114      114           
  Lines       10868    10866    -2     
=======================================
  Hits         4374     4374           
+ Misses       6092     6091    -1     
+ Partials      402      401    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@madhavilosetty-intel madhavilosetty-intel enabled auto-merge (squash) March 30, 2026 18:07
@madhavilosetty-intel madhavilosetty-intel force-pushed the update-cira-name branch 2 times, most recently from 82b682b to 7f97a4e Compare March 30, 2026 20:07
…figName

Enforce

alphanumhyphenunderscore validation (^[a-zA-Z0-9_-]+$) on the
in the name would pass through to downstream operations and cause a
500 Internal Server Error. With this change, invalid names are rejected
at the validation layer with a proper 4xx error.

Resolves device-management-toolkit/rps#2599
@madhavilosetty-intel madhavilosetty-intel merged commit 220e5fa into main Mar 30, 2026
18 of 19 checks passed
@madhavilosetty-intel madhavilosetty-intel deleted the update-cira-name branch March 30, 2026 21:14
@RosieAMT
Copy link
Copy Markdown

🎉 This PR is included in version 1.22.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug][Fuzz]: /api/v1/admin/ciraconfigs API returns 500 when creating CIRA config with invalid configName

3 participants