Bug 149750 - Hyperlinks should default to https
Summary: Hyperlinks should default to https
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Hyperlink
  Show dependency treegraph
 
Reported: 2022-06-27 21:17 UTC by L Duperval
Modified: 2024-06-04 11:06 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
preferHTTPS.patch: the abandoned commit mentioned in comment 4 (3.89 KB, patch)
2024-06-04 11:06 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description L Duperval 2022-06-27 21:17:56 UTC
Since we are moving away from http as an accepted protocol, when you enter a web address without specifying a protocol, the URL should default to https. 

For example, if I enter a Web URL as

example.com

The resulting URL should be

https://example.com

In version 7.3.3.2 it defaults to

http://example.com
Comment 1 Rafael Lima 2022-06-27 21:38:09 UTC
True, currently LO is defaulting to http instead of https.

Steps to reproduce:
1) Open Writer
2) Type www.somesite.com and press Enter
3) Writer will automatically format as a URL hyperlink
4) Right-click it and go to Edit Hyperlink
5) The URL will be http://www.somesite.com/

Instead it should be https://www.somesite.com/

Repro with

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: cb83063cc0eb4e93bd44bc0cb9b7c4841230cdef
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: threaded

And with

Version: 7.3.3.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 16; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Ubuntu package version: 1:7.3.3~rc2-0ubuntu0.21.10.1~lo1
Calc: threaded
Comment 2 Rafael Lima 2022-06-27 21:42:27 UTC
Actually this is happening not only in Writer, but in Calc, Impress and Draw as well.
Comment 3 Justin L 2023-11-01 17:07:53 UTC
I thought this might be a super easy one to find, but so luck so far. I searched for INET_HTTP_SCHEME, '"http://' and PROT_HTTP.

Likely changing it will break a lot of internal stuff that just expects http, like unit tests or other non-LAN interactions.
Comment 4 Justin L 2024-05-28 20:43:02 UTC
This works, but likely breaks all kinds of stuff.
https://gerrit.libreoffice.org/c/core/+/168167?usp=dashboard
Comment 5 Timur 2024-05-29 10:37:02 UTC
IMO this is WontFix, as it is based no wrong assmuption that we need to move from http to https, without reason.
Usually if a site has https only, it will redirect. No need for LO change. 
There is no use case described why the change would be necessary.
Comment 6 Justin L 2024-05-29 13:28:45 UTC
(In reply to Timur from comment #5)
> WONTFIX: based on wrong assumption that we need to move from http to https
Well said. I was going to say the same thing. The value of HTTPS is way overstated IMHO (or perhaps I should say the fear of HTTP is unwarranted).
Comment 7 Timur 2024-05-29 14:03:01 UTC
NEW status needs to be reconsidered. 
Rafael put it simply by reproducing, but that is not the same as accepting.
Comment 8 Caolán McNamara 2024-05-29 15:52:25 UTC
FWIW google docs auto-hyperlink-izes www.google.com to http://www.google.com so the 'autocorrect' level doesn't seem to explicitly put https:// there either. But Justin's patch seems reasonable to me on the face of things.

We are still auto detecting ftp.what.ever as a ftp:// link even though we dropped support for ftp, which is maybe mildly entertaining.
Comment 9 Justin L 2024-06-04 11:06:56 UTC
Created attachment 194544 [details]
preferHTTPS.patch: the abandoned commit mentioned in comment 4