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

reminder: harden OS and detect platform version #155

Open
Thorin-Oakenpants opened this issue May 4, 2022 · 6 comments
Open

reminder: harden OS and detect platform version #155

Thorin-Oakenpants opened this issue May 4, 2022 · 6 comments

Comments

@Thorin-Oakenpants
Copy link
Contributor

currently OS is a slam dunk with widget fonts, and if RFP is off, math can back that up for math results we know, but it would be nice to some other fallbacks. There are bound to be things different in GV world vs desktop (feature detection etc)

lets focus on fonts (and we could probably apply this to any browser)

  • https://arkenfox.github.io/TZP/tests/fontscripts.html
  • I plan to add more test PoCs, such as by unicode version (going back to say v5.0) and analyzing that to see if we can get a small subset - i.e some code points from each release that indicate older platforms (e.g. windows)
  • note we can already check for certain fonts per windows version (might get tricky with win11 except I think FF caps at win10 so it doesn't matter if we can't if we want to use this to detect/bypass a useragent lie) - abraham's speedy font face test

note: we don't have to be perfect with a result, as creepy said, the result can be like Win10

ToDo: build a platform-os test PoC page, e.g. like for Engine, Version. Hopefully this year

@Thorin-Oakenpants
Copy link
Contributor Author

ps: Win7 TB doesn't support Braille, which is interesting: I need to update my VMs or ask AF users / Tor Project forum for help testing

@Thorin-Oakenpants
Copy link
Contributor Author

arkenfox/user.js#1509 (comment)

So looks like my system font might not be 100% foolproof - awaiting results. This is me checking widget0 which is input type reset

see arkenfox/user.js#1509 (comment)

  • different test but -moz-dialog, -moz-button, -moz-list, and -moz-field are still MS Shell Dlg \32

@Thorin-Oakenpants
Copy link
Contributor Author

^ phew ... arkenfox/user.js#1509 (comment)

@Thorin-Oakenpants
Copy link
Contributor Author

Thorin-Oakenpants commented Sep 8, 2022

@Thorin-Oakenpants
Copy link
Contributor Author

https://gitlab.torproject.org/tpo/applications/tor-browser/-/issues/41347#note_2843379

just checking this entropy is already cpatured - font-optical-sizing and font-variation-settings should be listed under HTMLElementKeys right? I'm on win7 and my win10 VM is old - @abrahamjuliot

other than that

  • not a foolproof way, since it's behind a pref, but a good example of OS version diffs
  • comparing OS versions was something I've wanted to do for a long time and would have highlighted this

@abrahamjuliot
Copy link
Collaborator

Yeah, these should appear in computed styles. Nice detection. I wonder if there are more like this... found this -moz-osx-font-smoothing here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants