Page MenuHomePhabricator

http->https rewrite (=prefershttps) also rewrites http search urls for Special:Linksearch
Closed, ResolvedPublic

Description

With preferhttps option enabled by logged in users

http://de.wikipedia.org/wiki/Spezial:Weblinksuche/http://wikimedia.org

gets redirected to

https://de.wikipedia.org/wiki/Spezial:Weblinksuche/https://wikimedia.org

instead of

https://de.wikipedia.org/wiki/Spezial:Weblinksuche/http://wikimedia.org

The protocol part of the search url argument must not be rewritten.


Version: 1.23.0
Severity: normal
URL: http://de.wikipedia.org/wiki/Spezial:Weblinksuche/http://wikimedia.org

Details

Reference
bz63573

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:17 AM
bzimport set Reference to bz63573.
bzimport added a subscriber: Unknown Object (MLST).
Merl created this task.Apr 5 2014, 2:35 PM

str_replace replaced all instead of the first one. A regex replace with ^ at the begin would help here.

Wiki.php around line 537
$redirUrl = str_replace( 'http://', 'https://', $oldUrl );

Change 129925 had a related patch set uploaded by Umherirrender:
http -> https rewrite: Only replace one http by https

https://gerrit.wikimedia.org/r/129925

Change 129925 merged by jenkins-bot:
http -> https rewrite: Only replace one http by https

https://gerrit.wikimedia.org/r/129925

successfully merged