meshery/meshery
Ver no GitHub[Performance] Validate SMP clients and endpoint lists before indexing
Open
#18.979 aberto em 29 de abr. de 2026
help wanted
Métricas do repositório
- Stars
- (10.013 stars)
- Métricas de merge de PR
- (Mesclagem média 22d 16h) (332 fundiu PRs em 30d)
Description
Current Behavior
LoadTestUsingSMPHandler assumes that perfTest.Config.Clients[0] and testClient.EndpointUrls[0] always exist.
If an SMP payload omits clients or endpoints, the handler can panic with an index-out-of-range error instead of returning a validation error to the caller.
Expected Behavior
The handler should validate that at least one client and one endpoint are present before indexing into either slice, and it should return a clear 4xx response when they are missing.
Screenshots/Logs
Relevant code path:
server/handlers/load_test_handler.gotestClient := perfTest.Config.Clients[0]loadTestOptions.URL = testClient.EndpointUrls[0]
Environment
- Host OS: Linux
- Platform: Kubernetes
- Meshery Server Version: current master
- Meshery Client Version: current master
To Reproduce
- POST an SMP config with an empty
clientslist, or with a client that has an emptyendpointUrlslist. - Hit the performance test endpoint.
- Observe a server-side panic instead of a user-facing validation error.
Contributor Guides and Handbook
- 🛠 Meshery Build & Release Strategy
- 📚 Instructions for contributing to documentation
- 🎨 Wireframes and designs for Meshery UI in Figma (open invite)
- 📺 Self-paced Contributor Trainings
- 🙋🏾🙋🏼 Questions: Discussion Forum and Community Slack