summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandomChars <random@chars.jp>2021-09-28 15:58:58 +0900
committerRandomChars <random@chars.jp>2021-09-28 15:58:58 +0900
commit18224a06f95747443f5f9c9fc86ebe01d1d3f312 (patch)
treed101d79d3edf77bc81bb7863506c504bc13eef8c
parentce3928f7e64d4b09d05f0bd1810266e30a1d710f (diff)
move source URL matching to setv1.2.9
-rw-r--r--store/image.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/store/image.go b/store/image.go
index c4d3c40..2b5fdfd 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"
}