New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 780894 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Dec 11
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Feature



Sign in to add a comment

Load web pages directly from NFC tags.

Reported by thomas.d...@gmail.com, Nov 2 2017

Issue description

Device 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
 
Cc: sandeepkumars@chromium.org
Labels: Needs-triage-Mobile Needs-Feedback
@thomas.duboucher: Thanks for the report!!

Could you please help us with the sample file where you're seeing this issue to check from our end.

Thanks!!
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.
If it was never supported in Chromium in the first place, then it is
indeed a feature request.

Sorry for the unnecessary noise.
Project Member

Comment 4 by sheriffbot@chromium.org, Nov 6 2017

Labels: -Needs-Feedback
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
Components: Blink>HTML
Labels: Triaged-Mobile Type-Feature
Marking as Feature request as per comment #3 and adding appropriate component for further input's.

Thanks!!

Comment 6 by kochi@chromium.org, Nov 8 2017

Components: -Blink>HTML Blink>NFC
I don't think HTML is an appropriate component for considering this priority.
Forwarding to Blink>NFC, which may have better idea of this.

Comment 7 by scheib@chromium.org, Nov 15 2017

Status: Available (was: Unconfirmed)
Summary: Load web pages directly from NFC tags. (was: MIME text/html NDEF messages not supported)

Comment 8 by owe...@chromium.org, Nov 21 2017

Can you please share the use case you wanted this for, so we can fit it into our prioritization system? 
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.
Project Member

Comment 10 by sheriffbot@chromium.org, Nov 22

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
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
Components: -Blink>NFC UI>Browser>Mobile
This is not really a WebNFC thing but an Android intent handling thing. Reassigning to the general Clank component.
Cc: tedc...@chromium.org peconn@chromium.org
Labels: android-fe-triagedlabel
Status: Available (was: Untriaged)
Cc: rsesek@chromium.org
Components: Mobile>Intents
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.
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.
Status: WontFix (was: Available)
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.
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