owncloud / web

:dragon_face: Next generation frontend for ownCloud Infinite Scale
https://owncloud.dev/clients/web/
GNU Affero General Public License v3.0
420 stars 156 forks source link

Shortcuts with no protocol prefix #11063

Closed jesmrec closed 2 weeks ago

jesmrec commented 2 weeks ago

Describe the bug

Web client creates shortcuts without protocol prefix (if not typed by the user), that leads to unexpected behaviours in other clients that expects the URL inside the shortcuts with http/https. Mobile clients can not open URLs in a browser if the URL has no http/https protocol

Steps to reproduce

  1. New > Shortcut
  2. Add URL without protocol prefix, like owncloud.com
  3. Open shortcut in iOS client

Expected behavior

iOS client opens correctly the shortcut

Actual behavior

iOS can't open because the URL lacks of protocol

Actually, every client behaves in a different way:

As this unofficial format guide: https://www.lyberty.com/encyc/articles/tech/dot_url_format_-_an_unofficial_guide.html

URL

The URL field is self-explanatory. It’s the address location of the page to load. It should be a fully qualifying URL with the format protocol://server/page. A URL file is not restricted to the HTTP protocol. In general, at least, whatever that can be saved as a favorite is a valid URL.

So, my suggestion is:

Open to discussion with @felix-schwarz @Aitorbp @JuancaG05 @TheOneRing

kulmann commented 2 weeks ago

Fix for this should land in stable-8.0 and master. A patch release of v8.0 makes sense.

kulmann commented 2 weeks ago

I agree with the default behaviour of adding https:// if the user didn't provide a protocol. 👍

jesmrec commented 2 weeks ago

I agree with the default behaviour of adding https:// if the user didn't provide a protocol. 👍

Thanks for the feedback, we'll do in clients as well (iOS already does, Android will do), so that the URL will be formatted when the shortcut is created.

JammingBen commented 2 weeks ago

Has been fixed via https://github.com/owncloud/web/pull/11076.