Skip to content

Commit 8e826d2

Browse files
authored
fix broken parseResourceID (#5157)
1 parent 7d393f1 commit 8e826d2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

internal/http/services/appprovider/appprovider.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,13 @@ func (s *svc) handleNew(w http.ResponseWriter, r *http.Request) {
147147

148148
parentContainerRef, ok := spaces.ParseResourceID(parentContainerID)
149149
if !ok {
150-
writeError(w, r, appErrorInvalidParameter, "invalid parent container ID", nil)
151-
return
150+
// If this fails, client might be non-spaces
151+
var err error
152+
parentContainerRef, err = spaces.ResourceIdFromString(parentContainerID)
153+
if err != nil {
154+
writeError(w, r, appErrorInvalidParameter, "invalid parent container ID", nil)
155+
return
156+
}
152157
}
153158

154159
filename := r.Form.Get("filename")

0 commit comments

Comments
 (0)