Skip to content

Modern Docker Management, Designed for Everyone

fix: gotify token decryption missing from auto heal and prune notifications

Kyle Mendelle28c4a4e7015
diff --git a/backend/internal/services/notification_service.go b/backend/internal/services/notification_service.go
index d1f873b3e..4ef266e21 100644
--- a/backend/internal/services/notification_service.go
+++ b/backend/internal/services/notification_service.go
@@ -3088,6 +3088,13 @@ func (s *NotificationService) sendGotifyPruneNotification(ctx context.Context, e
if err := s.unmarshalConfigInternal(config, &gotifyConfig); err != nil {
return err
}
+ if gotifyConfig.Token != "" {
+ if decrypted, err := crypto.Decrypt(gotifyConfig.Token); err == nil {
+ gotifyConfig.Token = decrypted
+ } else {
+ slog.Warn("Failed to decrypt Gotify token, using raw value (may be unencrypted legacy value)", "error", err)
+ }
+ }
message := notifications.BuildPruneReportNotificationMessage(notifications.MessageFormatPlain, environmentName, result)
@@ -3296,6 +3303,13 @@ func (s *NotificationService) sendGotifyAutoHealNotification(ctx context.Context
if err := s.unmarshalConfigInternal(config, &gotifyConfig); err != nil {
return err
}
+ if gotifyConfig.Token != "" {
+ if decrypted, err := crypto.Decrypt(gotifyConfig.Token); err == nil {
+ gotifyConfig.Token = decrypted
+ } else {
+ slog.Warn("Failed to decrypt Gotify token, using raw value (may be unencrypted legacy value)", "error", err)
+ }
+ }
if gotifyConfig.Title == "" {
gotifyConfig.Title = notifications.BuildEmailSubject(environmentName, "Auto Heal")
}