Last modified: 2014-11-17 10:35: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 T31898, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29898 - User preference for enforcing HTTPS
User preference for enforcing HTTPS
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
User preferences (Other open bugs)
unspecified
All All
: Normal normal with 2 votes (vote)
: Future release
Assigned To: Tyler Romeo
:
: 12807 31432 32061 36456 (view as bug list)
Depends on:
Blocks: ssl 39676 41022 45765
  Show dependency treegraph
 
Reported: 2011-07-14 18:22 UTC by Brion Vibber
Modified: 2014-11-17 10:35 UTC (History)
19 users (show)

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


Attachments

Description Brion Vibber 2011-07-14 18:22:11 UTC
With the early protocol-relative link HTTP+HTTPS parallel deployments starting (bug 20643), we notice there's not currently any way to specify that, as a particular user account, you want to make sure you log in on HTTPS only. This means it's easy to accidentally log in insecurely even though you wanted to log in securely.

(This should also be sometimes on by default to force all sessions to be secure -- $wgSecureLogin sorta goes in this direction but doesn't force everything.)

In addition to making sure you're automatically sent through to the secure version (or not), this will allow users to receive the appropriate URL scheme in their email notifications: bug 29878.

Bonus points for being able to redirect from http to https links in order to bump over to a live SSL login session when following generic links found elsewhere. (may need another bug)
Comment 1 Andrew Garrett 2011-07-15 19:04:16 UTC
(In reply to comment #0)
> With the early protocol-relative link HTTP+HTTPS parallel deployments starting
> (bug 20643), we notice there's not currently any way to specify that, as a
> particular user account, you want to make sure you log in on HTTPS only. This
> means it's easy to accidentally log in insecurely even though you wanted to log
> in securely.

Remember that this requires our login form to first ask for the user's name, and then their password on a different page. I think I'd rather we just ran all logins through HTTPS to begin with.
Comment 2 Brion Vibber 2011-07-15 19:06:37 UTC
Running all login forms through HTTPS, then after that either keeping you in secure HTTPS-land or giving you an insecure cookie and shoving you back to HTTP, is common practice.

Forcing all logged-in sessions EVER onto HTTPS is my real preference, but I don't know if we're ready for that yet. :)
Comment 3 MZMcBride 2011-07-15 19:47:14 UTC
(In reply to comment #2)
> Forcing all logged-in sessions EVER onto HTTPS is my real preference, but I
> don't know if we're ready for that yet. :)

Yes, same.

I'm a bit unsure why an (intermediate) user preference would be good here. User preferences are generally fairly evil; they're made worse by a lack of support for global (Wikimedia-wide) user preferences.

It'd be simpler and saner to switch all e-mail links to be https when the time comes rather than going down the road of different messages based on user preferences. The only thing stopping people from using the secure server currently are the ugly URL scheme and the speed. I think waiting until both of these are resolved (hopefully in short order) and then forcing all users through https makes more sense than a user preference here. Admittedly other sites such as Facebook and Twitter have user preferences for https support. Some sites such as Gmail do not.
Comment 4 MZMcBride 2011-07-15 19:58:49 UTC
(In reply to comment #3)
> Admittedly other sites such as Facebook and Twitter have user 
> preferences for https support. Some sites such as Gmail do not.

Casey tells me I'm wrong about this, and I am. http://mail.google.com/support/bin/answer.py?hl=en&ctx=mail&answer=74765 explains that there is a user preference in Gmail, but that the default is for https.

I guess the common practice is to offer an option. I'm still unclear on the virtue of making this optional, though.
Comment 5 Roan Kattouw 2011-10-25 13:19:50 UTC
*** Bug 31432 has been marked as a duplicate of this bug. ***
Comment 6 Roan Kattouw 2011-10-25 13:23:23 UTC
(In reply to comment #0)
> Bonus points for being able to redirect from http to https links in order to
> bump over to a live SSL login session when following generic links found
> elsewhere. (may need another bug)
This was filed as bug 31432 and then duped to this bug. To accomplish this securely, we would need to do the following:
* When logging in over HTTPS and the pref is set, set the login cookies securely (as always) but set an insecure cookie that specifies that the user wants HTTPS
* On every HTTP request, check for the presence of this cookie and redirect to HTTPS if so. This also requires that the name of this cookie be added to the XVO header.

It appears that Liangent (in filing bug 31432) and Ryan (through an in-person conversation with me) both came up with the same plan separately.
Comment 7 Roan Kattouw 2011-10-31 08:33:46 UTC
*** Bug 32061 has been marked as a duplicate of this bug. ***
Comment 8 John Mark Vandenberg 2012-03-10 22:30:27 UTC
This can be done on the client side for Firefox and Chrome.
https://www.eff.org/https-everywhere
Comment 9 Nemo 2012-03-15 09:14:16 UTC
*** Bug 12807 has been marked as a duplicate of this bug. ***
Comment 10 Andre Klapper 2012-06-03 09:54:48 UTC
Does this report depend on bug 36456?
Comment 11 Krinkle 2012-07-20 16:17:29 UTC
This preference would be similar to GMail's preference I suppose.

It would:
* Affect e-mail notifications and other communication outside the site
* Make sure that logging-in forwards you to HTTPS if not already
* Set a non-secure cookie with the same expiration and domain that indicates the user is logged in on HTTPS and will make mediawiki redirect whenever a HTTP url is used (bug 36456)

Note that this option is only available if the site is configured with a protocol relative url as wgServer. And if the wgCanonicalServer has https, we may want to treat this preference as a hidden pref that is always true.
Comment 12 Krinkle 2012-07-20 16:18:02 UTC
*** Bug 36456 has been marked as a duplicate of this bug. ***
Comment 13 MZMcBride 2012-09-17 23:42:29 UTC
Related: change I60f44a10.
Comment 14 Chris Steipp 2012-09-28 20:57:42 UTC
Change I60f44a10, which implements the functionality described by Roan in comment #6 has been merged. It's triggered by selecting the "Stay connected to HTTPS after login" checkbox when logging in, which is visible when $wgSecureLogin is true. Is there any work remaining on this bug?
Comment 15 MZMcBride 2012-09-28 23:16:27 UTC
(In reply to comment #14)
> Change I60f44a10, which implements the functionality described by Roan in
> comment #6 has been merged. It's triggered by selecting the "Stay connected to
> HTTPS after login" checkbox when logging in, which is visible when
> $wgSecureLogin is true. Is there any work remaining on this bug?

There still doesn't appear to be a way, as a user, to specify that you want to receive communications that specify a particular protocol (cf. comment 0, comment 11, and bug 29878 comment 8).

Your patch addresses the cookie portion and the user option _at login_, but the general user preference is not implemented (or alternately, a particular protocol is not mandated), as far as I can tell. This may or may not be the subject of a separate bug, though.

Generally, I'm not sure the approach of using a "Stay connected to HTTPS after login" is a good idea. It doesn't serve a second use-case well (e-mail and other communications) and it seems like weird clutter on the login form UI. If any preference is to be implemented at all (and I'm not sure that mandating for logged-in users and user communications is really that bad), I think it should be done in the same place as every other user preference. This also gives it the benefit of having an easy-to-set default value.
Comment 16 billinghurst 2012-09-28 23:26:02 UTC
Fully agree that my component that was marked as duplicate( [[Bugzilla:32061]] send emails with https urls) does not seem to be implemented.  Of course, I would be comfortable with all urls to be https, and my problem goes away (and for those who prefer secure login)
Comment 17 Mark A. Hershberger 2012-09-30 16:30:35 UTC
The MW issue isn't going to be solved any time soon, so bumping to future.
Comment 18 Tyler Romeo 2013-04-29 15:46:42 UTC
https://gerrit.wikimedia.org/r/47089
Comment 19 Brion Vibber 2013-04-29 15:52:02 UTC
Any reason not to WONTFIX this and simply force HTTPS for all sessions?

The other 'big sites' like Gmail and Facebook have long since moved to HTTPS-only for all logins.
Comment 20 Tyler Romeo 2013-04-29 16:01:35 UTC
(In reply to comment #19)
> Any reason not to WONTFIX this and simply force HTTPS for all sessions?
> 
> The other 'big sites' like Gmail and Facebook have long since moved to
> HTTPS-only for all logins.

This isn't for logins, but for HTTPS all the time while logged in. And both Gmail and Facebook still have user preferences for whether users want to use HTTPS or not after login.
Comment 21 Brion Vibber 2013-04-29 16:03:50 UTC
Please show me the preference in Gmail to turn off SSL; I'm pretty sure they removed it years ago. Facebook does have one hidden, which is a pretty bad practice since it allows session hijacking.
Comment 22 Tyler Romeo 2013-04-29 16:06:01 UTC
Screenshots aren't working for me at the moment, but I see the option right now in my general settings for Gmail. (And here's the help page it links me to as well: http://support.google.com/mail/answer/74765?hl=en&ctx=mail).
Comment 23 Brion Vibber 2013-04-29 16:09:59 UTC
Ah, thankfully that option is entirely disabled for our corporate account, and only HTTPS is allowed. *shudder*

Guess I'm no longer surprised that people get their gmail accounts hijacked in China, eh?
Comment 24 billinghurst 2013-04-29 16:51:00 UTC
What is preventing us from 'leading' and turning it off?  What are the consequences of turning it off and not giving choice?
Comment 25 Gerrit Notification Bot 2013-08-20 00:08:31 UTC
Change 47089 merged by jenkins-bot:
Change secure login to use a user preference

https://gerrit.wikimedia.org/r/47089
Comment 26 Gerrit Notification Bot 2013-08-20 01:01:11 UTC
Change 79960 had a related patch set uploaded by Demon:
Change secure login to use a user preference

https://gerrit.wikimedia.org/r/79960
Comment 27 Gerrit Notification Bot 2013-08-20 01:03:34 UTC
Change 79963 had a related patch set uploaded by Demon:
Change secure login to use a user preference

https://gerrit.wikimedia.org/r/79963
Comment 28 Gerrit Notification Bot 2013-08-20 19:19:03 UTC
Change 79963 merged by jenkins-bot:
Change secure login to use a user preference

https://gerrit.wikimedia.org/r/79963
Comment 29 Gerrit Notification Bot 2013-08-20 19:25:27 UTC
Change 79960 merged by jenkins-bot:
Change secure login to use a user preference

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

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


Navigation
Links