+3
cmd/bluepages/handlers.go
+3
cmd/bluepages/handlers.go
···
74
func (srv *Server) resolveIdentityFromHandle(c echo.Context, handle syntax.Handle) error {
75
ctx := c.Request().Context()
76
77
did, err := srv.dir.ResolveHandle(ctx, handle)
78
if err != nil && errors.Is(err, identity.ErrHandleNotFound) {
79
return c.JSON(404, GenericError{
···
110
}
111
112
ident := identity.ParseIdentity(&doc)
113
declHandle, err := ident.DeclaredHandle()
114
if err != nil || declHandle != handle {
115
return c.JSON(400, GenericError{
···
74
func (srv *Server) resolveIdentityFromHandle(c echo.Context, handle syntax.Handle) error {
75
ctx := c.Request().Context()
76
77
+
handle = handle.Normalize()
78
+
79
did, err := srv.dir.ResolveHandle(ctx, handle)
80
if err != nil && errors.Is(err, identity.ErrHandleNotFound) {
81
return c.JSON(404, GenericError{
···
112
}
113
114
ident := identity.ParseIdentity(&doc)
115
+
// NOTE: 'handle' was resolved above, and 'DeclaredHandle()' returns a normalized handle
116
declHandle, err := ident.DeclaredHandle()
117
if err != nil || declHandle != handle {
118
return c.JSON(400, GenericError{