balena-io-modules / etcher-sdk

Apache License 2.0
42 stars 17 forks source link

path: prefix url with http:// if not provided when flashing from url #284

Closed aethernet closed 1 year ago

dfunckt commented 1 year ago

@aethernet i think it’s much better to fail with an error if the given argument is a malformed URI than assuming prefixing “http” is the correct answer. It’s the caller’s responsibility to sanitize the argument as they’re the ones dealing with the user.

Also, Etcher allegedly freezes completely when the URL is malformed and that should also be fixed.

aethernet commented 1 year ago

i mostly agree as we don't accept any other protocols but http/https i think it's fair to assume http here

aethernet commented 1 year ago

thinking more about it, you're right let's do that frontend and improve the error handling on EP