Last modified: 2013-06-18 13:32:05 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T31925, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29925 - https-links should not be outputted to irc.wikimedia.org (Regression)
https-links should not be outputted to irc.wikimedia.org (Regression)
Status: RESOLVED FIXED
Product: Wikimedia
Classification: Unclassified
IRC (Other open bugs)
unspecified
All All
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
: code-update-regression
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-16 20:57 UTC by Krinkle
Modified: 2013-06-18 13:32 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Krinkle 2011-07-16 20:57:23 UTC
Today I noticed an https-link showing up in the raw recentchanges feed at irc.wikimedia.org, it was this link:

https://commons.wikimedia.org/w/index.php?diff=56725539&oldid=53104016&rcid=57922460
Comment 1 Ryan Lane 2011-07-19 00:14:29 UTC
Why shouldn't the links be outputted as https?
Comment 2 Roan Kattouw 2011-08-17 14:33:19 UTC
(In reply to comment #1)
> Why shouldn't the links be outputted as https?
Because it breaks their patrolling bots. Which is stupid, but whatever.

There is precedent for this, though: there is code in place to output normal http URLs to IRC instead of https://secure.wikimedia.org URLs. The relevant hack in MediaWiki is Title::getInternalUrl(), $wgInternalServer and the GetInternalUrl hook, all of which date back to 2005 AFAIK. The WMF configuration for this is in wmf-config/secure.php .

I've fixed this in CommonSettings.php as follows:

 } elseif ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ) {
        // New HTTPS service on regular URLs
+       $wgInternalServer = $wgServer; // Keep this as HTTP for IRC notifications (bug 29925)
        $wgServer = preg_replace( '/^http:/', 'https:', $wgServer );
 } else {
        # For non-SSL hosts...
Comment 3 Krinkle 2011-08-24 23:15:43 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Why shouldn't the links be outputted as https?
> Because it breaks their patrolling bots. Which is stupid, but whatever.

It doesn't brake most bots, it brakes the workflow of the users. Their cookie that keeps them logged in to a wiki doesn't apply when they suddenly get a link to a different protocol in the middle of the rest. The links on IRC should all have the same protocol (perhaps  wgCanonicalServer?)
Comment 4 Ryan Lane 2011-08-24 23:26:31 UTC
Logged in users should be using https... Isn't it more likely that when this is fully rolled out that it's more likely passing out http links will break people's workflow?
Comment 5 Krinkle 2011-08-24 23:30:17 UTC
(In reply to comment #4)
> Logged in users should be using https... Isn't it more likely that when this is
> fully rolled out that it's more likely passing out http links will break
> people's workflow?

Maybe, maybe not. But it's obvious that there should be a default configured somewhere, and that hyperlinks pushed to an environment independent from the user making the action should all have the same protocol and not the protocol of the user making the change (just like enotifs). Whether the default for udp-recentchanges is http or https will (or should) likely match the default for logged-in users in general.

So long as nobody is getting https by default, it makes sense that non-user specific links are also http.

Right now practically none of the mass readers/editors uses https or https://secure.wm.o
Comment 6 Ryan Lane 2011-08-24 23:31:30 UTC
That's because secure is an unreliable POS.
Comment 7 Roan Kattouw 2011-08-25 09:06:49 UTC
(In reply to comment #3)
> The links on IRC should all
> have the same protocol (perhaps  wgCanonicalServer?)
They use $wgCanonicalServer now, yes.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links