From 84f73d9db810fb152dc401a8ac74d96e717be2dc Mon Sep 17 00:00:00 2001 From: erik Date: Tue, 26 Mar 2024 16:56:06 +0100 Subject: [PATCH] Add ToDo --- models/forgefed/actor.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/models/forgefed/actor.go b/models/forgefed/actor.go index 28126fe2ce..efc62284f1 100644 --- a/models/forgefed/actor.go +++ b/models/forgefed/actor.go @@ -8,6 +8,7 @@ import ( "net/url" "strings" + "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/validation" @@ -58,7 +59,7 @@ func (id ActorID) Validate() []string { result = append(result, validation.ValidateNotEmpty(id.UnvalidatedInput, "unvalidatedInput")...) if id.UnvalidatedInput != id.AsURI() { - result = append(result, fmt.Sprintf("not all input: %q was parsed: %q", id.UnvalidatedInput, id.AsURI())) + result = append(result, fmt.Sprintf("not all input was parsed, \nUnvalidated Input:%q \nParsed URI: %q", id.UnvalidatedInput, id.AsURI())) } return result @@ -178,6 +179,8 @@ func removeEmptyStrings(ls []string) []string { func newActorID(uri string) (ActorID, error) { validatedURI, err := url.ParseRequestURI(uri) + log.Info("Validated URI is: %v", validatedURI) + log.Info("Input is: %v", validatedURI) if err != nil { return ActorID{}, err } @@ -195,7 +198,7 @@ func newActorID(uri string) (ActorID, error) { result.Host = validatedURI.Hostname() result.Path = pathWithoutActorID result.Port = validatedURI.Port() - result.UnvalidatedInput = validatedURI.String() + result.UnvalidatedInput = validatedURI.String() // ToDo: Whats happening here? return result, nil }