diff options
author | mataha <mataha@users.noreply.github.com> | 2022-04-09 19:22:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-09 19:22:39 +0300 |
commit | abbf37435ec03368f11dd6eaeb84342331e3c065 (patch) | |
tree | 59a40d07672d7ddbb643f1b3d500afe978ce1d9a /src | |
parent | 73d8a4d5dbd2c45bd141518bb8b9a2ad796fde1f (diff) |
CHANGE(client): Make https default link protocol
Having plain http as the default means that a site, even though able to support
https, will be able to fall back to using the insecure and outdated protocol.
Furthermore, major browsers already support https by default, falling back to
legacy http in the cases where a website does not support https connections,
e.g. [Chromium](https://blog.chromium.org/2021/03/a-safer-default-for-navigation-https.html),
[Firefox](https://blog.mozilla.org/security/2021/08/10/firefox-91-introduces-https-by-default-in-private-browsing/).
Therefore, this commit makes it so that a link without a protocol specification
will have `https://` prefixed to be clickable instead of `http://`.
Signed-off-by: mataha <mataha@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mumble/Markdown.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mumble/Markdown.cpp b/src/mumble/Markdown.cpp index 2b251a9fb..fbd88f678 100644 --- a/src/mumble/Markdown.cpp +++ b/src/mumble/Markdown.cpp @@ -322,9 +322,8 @@ bool processPlainLink(QString &str, int &offset) { QString url = match.captured(0); if (url.startsWith(QLatin1String("www"), Qt::CaseInsensitive)) { - // Link is missing a protocol specification. - // Use http as the default - url = QStringLiteral("http://") + url; + // Link is missing a protocol specification - use https as the default + url = QStringLiteral("https://") + url; } QString replacement = |