gbif / ipt

GBIF Integrated Publishing Toolkit (IPT)
https://www.gbif.org/ipt
Apache License 2.0
128 stars 58 forks source link

Validate resource logo URL is an URL starting with `http` or `https` #2584

Open mike-podolskiy90 opened 2 weeks ago

mike-podolskiy90 commented 2 weeks ago

Issues were discovered in this IPT https://ipt.jbrj.gov.br/jabot

IPT accepts images to be embed like data:[<mediatype>][;base64],<data> which is not accepted by the registry. Registry expects logos to be proper URLs starting with http or https and it prevents resources from registration.

https://github.com/gbif/gbif-api/blob/dev/src/main/java/org/gbif/api/util/URIValidator.java#L55

So we have to align the IPT with the registry and require the same.