Skip to content

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

@shaoboon

Description

@shaoboon

Describe the bug

The /api/v1/admin/ciraconfigs endpoint crashes with Internal Server Error instead of returning a client validation error for malformed configName input.

Steps to reproduce

  1. Request:
    POST /api/v1/admin/ciraconfigs HTTP/1.1\r\nAccept: application/json\r\nHost: device-management-toolkit-rps-1:8081\r\nContent-Type: application/json\r\n\r\n{\n "configName":"%fGLW@z_wqOD^LtX5vK1AXl",\n "mpsServerAddress":"192.168.1.1",\n "mpsPort":4433,\n "username":"mpsuser",\n "password":"P@ssw0rd123",\n "commonName":"192.168.1.1",\n "serverAddressFormat":3,\n "authMethod":2,\n "mpsRootCertificate":"U3dhZ2dlciByb2Nrcw==",\n "proxyDetails":""}\r\n
    
  2. Response:
    HTTP/1.1 500 Internal Server Error\r\nX-Powered-By: Express\r\nAccess-Control-Allow-Origin: *\r\nContent-Type: application/json; charset=utf-8\r\nContent-Length: 60\r\nETag: W/"3c-Lt2daMYvL10KQbsuNBB/d3DIjcM"\r\nDate: Mon, 16 Mar 2026 02:34:39 GMT\r\nConnection: keep-alive\r\nKeep-Alive: timeout=5\r\n\r\n{"message":"Operation failed: POST %fGLW@z_wqOD^LtX5vK1AXl"}
    

Expected behavior

API should return 4xx validation error for invalid configName and never return 500.

Screenshots

No response

AMT Version

N/A

Configuration Mode

CCM

Operating System

Linux Ubuntu

AMT Device Information

No response

Service Deployment Information

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions