Skip to content

Sanitize service names containing slashes#547

Merged
aparajon merged 1 commit intocashapp:masterfrom
borisilic-ap:fix/sanitize-service-name-slashes
Mar 25, 2026
Merged

Sanitize service names containing slashes#547
aparajon merged 1 commit intocashapp:masterfrom
borisilic-ap:fix/sanitize-service-name-slashes

Conversation

@borisilic-ap
Copy link
Copy Markdown
Contributor

Summary

  • Service names containing slashes (e.g., "ki/ki") break URL routing in the UI because the slash becomes a path separator in the generated URL path.
  • Replace / with - in the service name in ConfigureServiceAction before it is stored as registry_name in the database.
  • Add tests verifying that the sanitized name produces clean URL paths and that a service registered with a slash in its name is reachable under the sanitized name.

Test plan

  • ServiceShowActionTest.service name with slash should not produce extra path segments -- verifies ServiceShowAction.path("ki-ki", null) produces /services/ki-ki/ with no extra path segments.
  • ServiceShowActionTest.service with slash in name should be reachable after sanitization -- registers a service as "ki/ki", then confirms it is stored and retrievable as "ki-ki".

🤖 Generated with Claude Code

Service names with slashes (e.g., "ki/ki") break URL routing in the UI
because the slash becomes a path separator. Replace `/` with `-` in the
service name before storing it in the database.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@borisilic-ap borisilic-ap marked this pull request as ready for review March 25, 2026 21:31
@aparajon aparajon enabled auto-merge (squash) March 25, 2026 22:24
@aparajon aparajon merged commit 3e987dc into cashapp:master Mar 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants