Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Research] Win 10 in S mode - detection on mozilla.org #6367

Closed
ejregithub opened this issue Oct 26, 2018 · 13 comments

Comments

Projects
3 participants
@ejregithub
Copy link
Contributor

commented Oct 26, 2018

Description: Currently mozilla.org is unable to detect visitors to the site that are using Windows 10 in S mode to do so. This project

Problem statement: Users of Win 10 in S mode are unable to install Firefox, being limited to installs only via the Microsoft app store. This limits a large potential set of Firefox users.

Success Criteria:

  • mozilla.org is able to reliably detect visitors to the site on Win 10 in S mode
@alexgibson

This comment has been minimized.

Copy link
Member

commented Jan 2, 2019

UA string from a Levono laptop I obtained running Windows 10 S, running Microsoft Edge:

navigator.userAgent

"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299"

navigator.platform

"Win32"
@alexgibson

This comment has been minimized.

Copy link
Member

commented Jan 2, 2019

Firefox install flow:

Searched for "Download Firefox"

firefox search result

After ignoring all the Edge messaging in the search results, I clicked the moz.org link and downloaded as normal. Once the download had completed, I double clicked the installer .exe, which was then blocked by this message:

install blocked

Because I wanted to install Firefox, I clicked the "See how" link, which then opened this screen:

click see how link

This screen told me absolutely nothing about what I wanted to know. In frustration, I tried double clicking the Firefox installer again. This time, I got a different message:

install blocked 2

This time, clicking the "See how" link took me to somewhere more useful:

click see how link 2

I can only assume the first message I got was because it was the first time I had tried to install another browser.

@alexgibson

This comment has been minimized.

Copy link
Member

commented Jan 2, 2019

Install flow for Chrome:

Searched for "Download Chrome"

chrome search result

Again, some pretty agressive messaging for Edge. I ignored it, and went to download Chrome:

download chrome

Google does not detect Windows 10 S in any way, much like mozorg. There is no specific messaging shown to Edge users:

download chrome 2

Double clicking the Chrome .exe installer results in the same message shown to Firefox:

chrome install blocked

@alexgibson

This comment has been minimized.

Copy link
Member

commented Jan 4, 2019

UA string from Window 10 Pro laptop:

navigator.userAgent:

"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240"

navigator.platform:

"Win32"
@alexgibson

This comment has been minimized.

Copy link
Member

commented Jan 4, 2019

Comparison between user agent strings:

Window 10 Pro:

"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240"

Windows 10 S:

"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36 Edge/16.16299"

Conclusion: there is no identifiable difference, so using UA sniffing to identify Windows 10 in S mode is not going to be possible.

@alexgibson

This comment has been minimized.

Copy link
Member

commented Jan 4, 2019

I've spent some time looking through other properites exposed to JS from navigator in Edge, and I don't see anything that identifies S mode.

@alexgibson

This comment has been minimized.

Copy link
Member

commented Jan 4, 2019

@ejregithub initial research is complete, please see above for details.

@alexgibson alexgibson moved this from In Progress to In Review in Websites Durable Team Project Sprint Board Jan 4, 2019

@alexgibson

This comment has been minimized.

Copy link
Member

commented Feb 26, 2019

The Firefox product team have reached out to Micorosoft directly on this. There is a proprietary API in Edge that may give us the information we need:

https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/mt795399%28v%3dvs.85%29

"I believe you are looking for 178 or 179 in the “unlocked” value."

I'm going to try and test this out on a device and report back. It's currently not clear if this API will still work when Edge moves to Chromium.

@alexgibson

This comment has been minimized.

Copy link
Member

commented Feb 28, 2019

I've tested the above out on a laptop running Windows 10 Pro in S mode, in Edge 17 and I see the following:

console.log(window.external.getHostEnvironmentValue('os-mode'));
  {"os-mode":"2"}

On a regular Windows 10 VM I see the following:

console.log(window.external.getHostEnvironmentValue('os-mode');
  {"os-mode":"0"}

Notes of interest:

  • The results are definitely different, but they are also not the expected values cited in the email.
  • The docs seem to suggest that 0 is unlocked, but there is no public information on what the other values represent.
  • It's still unclear if this API will be present when Edge switches to Chromium.
  • I had to upgrade my laptop to the latest version of Windows 10 and Edge in order to get this API to work. It wasn't present in the version of Edge that shipped with my laptop.
@alexgibson

This comment has been minimized.

Copy link
Member

commented Mar 4, 2019

@ericlaw1979

This comment has been minimized.

Copy link

commented Mar 25, 2019

The value returned is from https://docs.microsoft.com/en-us/windows/desktop/devnotes/wldp-windows-lockdown-mode

typedef enum _WLDP_WINDOWS_LOCKDOWN_MODE { WLDP_WINDOWS_LOCKDOWN_MODE_UNLOCKED = 0, WLDP_WINDOWS_LOCKDOWN_MODE_TRIAL = 1, WLDP_WINDOWS_LOCKDOWN_MODE_LOCKED = 2, WLDP_WINDOWS_LOCKDOWN_MODE_MAX = 3 } WLDP_WINDOWS_LOCKDOWN_MODE, *PWLDP_WINDOWS_LOCKDOWN_MODE;

At present, getHostEnvironmentValue() is not in the Chromium-based version of Edge.

@alexgibson

This comment has been minimized.

Copy link
Member

commented Mar 26, 2019

@ejregithub can you please get this in the backlog so we can prioritize this work? Thanks

@ejregithub

This comment has been minimized.

Copy link
Contributor Author

commented Mar 26, 2019

Closing this issue. I will create a new one for the work itself (bedrock detecting Win 10 S mode visitors to www.mozilla.org) and reference this issue in that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.