Load web pages directly from NFC tags.
Reported by
thomas.d...@gmail.com,
Nov 2 2017
|
||||||||||
Issue descriptionDevice name: Xperia M4 Aqua Dual (France) E2333 From "Settings > About Chrome" Application version: 61.0.3163.98 Operating system: Android 6.0.1; E2333 Build/26.B.1.33 URLs (if applicable): Steps to reproduce: (1) Load a NDEF-formattable tag with a HTML5 document Example minimalist document used ``` <!doctype html><title>Hello World!</title> ``` Converted into the following NDEF message (TNF 0x02, MIME text/html) ``` D2 09 2A 74 65 78 74 2F 68 74 6D 6C 3C 21 64 6F 63 74 79 70 65 20 68 74 6D 6C 3E 3C 74 69 74 6C 65 3E 48 65 6C 6C 6F 20 57 6F 72 6C 64 21 3C 2F 74 69 74 6C 65 3E ``` (2) Read the tag with the NFC reader of the phone. Expected result: Application selection dialog pops up, selecting Chrome would open the HTML document in Chrome. Actual result: Application selection dialog pops up, Chrome is not listed. Additional information: Chrome seems to not register text/html as an intent it can process. The intent filter seems to be missing <data android:mimeType="text/html" />, and most surely the code behind to process the file too. https://chromium.googlesource.com/chromium/src.git/+/46.0.2478.0/chrome/android/java/AndroidManifest.xml#186
,
Nov 6 2017
thomas.duboucher@ sandeepkumars@ If I remember correctly, chrome never supported ndef records with "text/html" mime types. https://cs.chromium.org/chromium/src/chrome/android/java/AndroidManifest.xml?q=androidman&sq=package:chromium&l=250 Looks like a feature request, not a regression or a bug.
,
Nov 6 2017
If it was never supported in Chromium in the first place, then it is indeed a feature request. Sorry for the unnecessary noise.
,
Nov 6 2017
Thank you for providing more feedback. Adding requester "sandeepkumars@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 7 2017
Marking as Feature request as per comment #3 and adding appropriate component for further input's. Thanks!!
,
Nov 8 2017
I don't think HTML is an appropriate component for considering this priority. Forwarding to Blink>NFC, which may have better idea of this.
,
Nov 15 2017
,
Nov 21 2017
Can you please share the use case you wanted this for, so we can fit it into our prioritization system?
,
Nov 21 2017
The idea/use case behind this was for a Type 4 NFC Tag to serve a webpage showing data from the tag itself. My current workaround is to return instead an URL where the content is encoded in the fragment identifier of the URL, to a webpage whose javascript would decode it. The drawback is that it requires network access, to setup a web server and may have privacy implications. Another workaround would be to store an URL to e.g. an instant app in the first record and the data in the next records. Note that it is not possible to simply return an URL, because the data to be shown is stored on the tag itself, and it is not feasible to expect a passive NFC Tag to be synchronized with a server.
,
Nov 22
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 28
This is not really a WebNFC thing but an Android intent handling thing. Reassigning to the general Clank component.
,
Dec 11
,
Dec 11
content: URIs are the normal way of passing around local web content, but that wouldn't be possible off of a NFC tag. +rsesek to comment on whether accepting data: URIs would be dangerous for Chrome. I'm not aware of any new attack vectors that would open. With that said even if it is safe, I don't know if we want to support this and whether it would end up giving us more headaches as changing our intent system often triggers other problems to arise.
,
Dec 11
Chrome doesn't allow pages to navigate to top-level data: URIs (see issue 594215 ). This isn't quite the same scenario, but I think the motivations behind that change (namely user confusion regarding the data: scheme and its use as a common spoofing vector) apply here.
,
Dec 11
Thanks for the security input. Going to close this out then as I don't think this usecase is pressing enough to justify a change in that position.
,
Dec 11
Agreed with comments #14 and #15. We don't allow data URLs to be loaded from the web, so not supporting them from NFC tags sounds consistent. |
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by sandeepkumars@chromium.org
, Nov 3 2017Labels: Needs-triage-Mobile Needs-Feedback