mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-09-25 19:54:15 +00:00
fix 500 when trying to use did
This commit is contained in:
@@ -442,9 +442,10 @@ func (nr *NamespaceResolver) Repository(ctx context.Context, name reference.Name
|
||||
}
|
||||
|
||||
// Create a new reference with identity/image format
|
||||
// Use the identity (or DID) as the namespace to ensure canonical format
|
||||
// This transforms: evan.jarrett.net/debian -> evan.jarrett.net/debian (keeps full path)
|
||||
canonicalName := fmt.Sprintf("%s/%s", identityStr, imageName)
|
||||
// Use the resolved handle (not raw DID) to ensure the name is valid per OCI reference grammar.
|
||||
// DIDs contain colons which are illegal in reference path components.
|
||||
// This transforms: did-plc-abc123/myimage -> alice.bsky.social/myimage
|
||||
canonicalName := fmt.Sprintf("%s/%s", handle, imageName)
|
||||
ref, err := reference.ParseNamed(canonicalName)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("invalid image name %s: %w", imageName, err)
|
||||
|
||||
Reference in New Issue
Block a user