getodk / aggregate

ODK Aggregate is a Java server that stores, analyzes, and presents survey data collected using ODK Collect. Contribute and make the world a better place! ✨🗄✨
https://docs.opendatakit.org/aggregate-intro/
Other
74 stars 227 forks source link

Prevent false positives when validating a JSON publisher URL #457

Closed ggalmazor closed 5 years ago

ggalmazor commented 5 years ago

Problem description

451 introduced URL validation into the JSON publisher creation dialog using a custom regular expression.

We can't really be sure that the regexp won't produce false positives and reject valid URLs.

We want to be on the safe side and prevent giving users a hard time unnecessarily. Instead of complete URL validation, we would want to relax the URL validation to a bare minimum that guarantees that we won't even produce false positives.

Checking that URL starts with http:// or https:// could be enough for us at this moment.