Page MenuHomePhabricator

Duplicate protocol in links if $wgServer specifies a protocol
Closed, ResolvedPublic

Description

In at least one place (src/js/modal.js#L1054), Convenient Discussions prepends "https:" to the value of $wgServer.

However, if $wgServer specifies a URL with a protocol (e.g. https://en.wikipedia.org), the URL that Convenient Discussions obtains will start with https:https://en.wikipedia.org.

Convenient Discussions should probably check whether $wgServer is a protocol-relative or a protocol-absolute URL, and prepend "https:" accordingly.

Event Timeline

Jack_who_built_the_house claimed this task.

Thanks.

Convenient Discussions should probably check whether $wgServer is a protocol-relative or a protocol-absolute URL, and prepend "https:" accordingly.

This is currently done in https://github.com/jwbth/convenient-discussions/blob/1c4beeefd9f97f1ec6b1fbd00b918966eeca7f44/src/js/app.js#L299.