diff --git a/store/image.go b/store/image.go index c4d3c400e8ca25a9bbd8e954cbf6301f030efa7d..2b5fdfd26c2825c8344b202089d920e02424bc4a 100644 --- a/store/image.go +++ b/store/image.go @@ -285,7 +285,7 @@ func (s *Store) ImageAdd(data []byte, flake string) Image { // ImageUpdate updates image metadata. func (s *Store) ImageUpdate(hash, source, parent, commentary, commentaryTranslation string) { // Only accept URLs and below 1024 in length - if len(source) >= 1024 || !s.MatchURL(source) { + if len(source) >= 1024 { return } @@ -306,7 +306,7 @@ func (s *Store) ImageUpdate(hash, source, parent, commentary, commentaryTranslat var msg string // Update and save - if source != "\000" { + if source != "\000" && s.MatchURL(source) { info.Source = source msg += "source" }