commit aa403a36ad962a2a18596b5bd7a499b0a072eadc
parent 5b3e219274190a9270640d143a924ab1ffe7c02d
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date: Sat, 25 Jan 2025 21:29:32 +0100
minor cleanups in strings
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/pkg/rest/taldir.go b/pkg/rest/taldir.go
@@ -415,7 +415,7 @@ func (t *Taldir) validationRequest(w http.ResponseWriter, r *http.Request) {
}
err = t.Db.Delete(&validation).Error
if err != nil {
- log.Fatalf("Error deleting validation")
+ log.Println("Error deleting validation")
w.WriteHeader(http.StatusInternalServerError)
return
}
@@ -437,7 +437,7 @@ func (t *Taldir) validationRequest(w http.ResponseWriter, r *http.Request) {
}
} else {
if validation.TargetUri == "" {
- log.Printf("Validated a deletion request but no entry found for '%s´\n", entry.HsAddress);
+ log.Printf("Validated a deletion request but no entry found for `%s'\n", entry.HsAddress);
} else {
err = t.Db.Create(&entry).Error
if err != nil {
@@ -551,7 +551,6 @@ func (t *Taldir) registerRequest(w http.ResponseWriter, r *http.Request) {
validationExists := (nil == err)
// FIXME: Always set new challenge?
validation.Challenge = util.GenerateChallenge(t.ChallengeBytes)
- log.Printf("Challenge: %s\n", validation.Challenge)
if !validationExists {
validation.TargetUri = req.TargetUri
validation.SolutionAttemptCount = 0
@@ -614,7 +613,7 @@ func (t *Taldir) registerRequest(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(500)
return
}
- log.Printf("Found `%s` in path as `%s`", validator.Command, path)
+ log.Printf("Found `%s' in path as `%s'\n", validator.Command, path)
topic := t.I18n.GetLocale(r).GetMessage("taldirRegTopic")
link := t.Host + "/register/" + url.QueryEscape(validation.HAddress) + "/" + url.QueryEscape(validation.Challenge) + "?address=" + url.QueryEscape(req.Address)
message := t.I18n.GetLocale(r).GetMessage("taldirRegMessage", link)
@@ -626,6 +625,7 @@ func (t *Taldir) registerRequest(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(500)
return
}
+ // FIXME does this persist this boolean or do we need to call Db.Save again?
validation.ChallengeSent = true
w.WriteHeader(202)
}
@@ -689,7 +689,7 @@ func (t *Taldir) validationPage(w http.ResponseWriter, r *http.Request) {
return
}
- // This is kind of broken and probablzy requires wallet support
+ // FIXME: This is kind of broken and probably requires wallet support/integration first
if validation.RequiresPayment {
log.Println("Validation requires payment")
walletLink = "taler://taldir/" + vars["h_address"] + "/" + vars["challenge"] + "-wallet"