-
Notifications
You must be signed in to change notification settings - Fork 36
Restrict SpeechRecognition and friends to secure contexts #31
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
Conversation
LGTM, this is worth a try. |
e7ef1f2
to
71bfe55
Compare
Done. |
SpeechRecognition uses microphone so that makes sense to restrict. For SpeechSynthesis, I am less sure, do we have some numbers there? |
Not in the current state of the spec, no, it doesn't have to. It can take its input from a |
This is a new API so the web compat risk is very low. |
It is not, it has been shipped for about 11 years in Chrome, says MDN. @evanbliu, what's Chrome opinion on this matter? |
SpeechRecognition with microphone is not new, but SpeechRecoginition with any MediaStreamTrack is new AFAIK and is probably not a web compat issue. |
Oops, sorry I missed this. Restricting SpeechRecognition to secure contexts sounds fine to me! But it seems like this isn't necessary for SpeechSynthesis. |
@padenot & @youennf - What are your thoughts on gating the Web Speech API (or at least the on-device parts of it) behind a Permission Policy? Without this limitation, if a legitimate site using this API embeds a third-party iframe (e.g. an ad), that ad could read the same fingerprinting bits through |
This might deserve its own bug. I would instead tend to reduce what is being exposed to the bare minimum, do we have a bug tracker for that, or should I file one? Getting back to SecureContext, @padenot, what are your thoughts? |
Mozilla's
|
Can we then only tackle |
Also, it would be nice to have a WPT legacy test to check that the constructs no longer appear in non secure contexts. |
71bfe55
to
b94c977
Compare
b94c977
to
da41368
Compare
Done. We can write a idlharness test after merging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unofficial LGTM (it seems I cannot approve PRs here).
I've formally asked @evanbliu for a review, assuming Google is fine w/ the change. |
SHA: ff12a0d Reason: push, by padenot Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
rdar://151240414 https://bugs.webkit.org/show_bug.cgi?id=292941 Reviewed by NOBODY (OOPS!). Align implementation with WebAudio/web-speech-api#31. * LayoutTests/http/wpt/mediastream/speechrecognition-insecure-expected.txt: Added. * LayoutTests/http/wpt/mediastream/speechrecognition-insecure.html: Added. * Source/WebCore/Modules/speech/SpeechRecognition.idl: * Source/WebCore/Modules/speech/SpeechRecognitionAlternative.idl: * Source/WebCore/Modules/speech/SpeechRecognitionErrorEvent.idl: * Source/WebCore/Modules/speech/SpeechRecognitionEvent.idl: * Source/WebCore/Modules/speech/SpeechRecognitionResult.idl:
rdar://151240414 https://bugs.webkit.org/show_bug.cgi?id=292941 Reviewed by Brady Eidson, Per Arne Vollan, and Sihui Liu. Align implementation with WebAudio/web-speech-api#31. * LayoutTests/http/wpt/mediastream/speechrecognition-insecure-expected.txt: Added. * LayoutTests/http/wpt/mediastream/speechrecognition-insecure.html: Added. * Source/WebCore/Modules/speech/SpeechRecognition.idl: * Source/WebCore/Modules/speech/SpeechRecognitionAlternative.idl: * Source/WebCore/Modules/speech/SpeechRecognitionErrorEvent.idl: * Source/WebCore/Modules/speech/SpeechRecognitionEvent.idl: * Source/WebCore/Modules/speech/SpeechRecognitionResult.idl: Canonical link: https://commits.webkit.org/294887@main
Fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=30176.
Preview | Diff
Preview | Diff