Skip to content

Commit

Permalink
Enforce lowercase for username and dw name
Browse files Browse the repository at this point in the history
Signed-off-by: David Kwon <dakwon@redhat.com>
  • Loading branch information
dkwon17 authored and tolusha committed May 31, 2023
1 parent cf3e310 commit b259760
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controllers/devworkspace/solver/che_routing.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,8 @@ func normalize(username string) string {

result := r1.ReplaceAllString(username, "-") // replace invalid chars with '-'
result = r2.ReplaceAllString(result, "-") // replace multiple '-' with single ones
return r3.ReplaceAllString(result, "") // trim dashes at beginning/end
result = r3.ReplaceAllString(result, "") // trim dashes at beginning/end
return strings.ToLower(result)
}

func (c *CheRoutingSolver) getInfraSpecificExposer(cheCluster *chev2.CheCluster, routing *dwo.DevWorkspaceRouting, objs *solvers.RoutingObjects, endpointStrategy EndpointStrategy) (func(info *EndpointInfo), error) {
Expand Down

0 comments on commit b259760

Please sign in to comment.