Closed Bug 1140265 Opened 10 years ago Closed 7 years ago

[Manifest] Use "name" instead of "short_name" when short_name is not a string

Categories

(Firefox OS Graveyard :: Gaia, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(tracking-b2g:+)

RESOLVED WONTFIX
tracking-b2g +

People

(Reporter: hcheng, Assigned: tedders1)

References

Details

(Whiteboard: [systemsfe])

* Description:
When "short_name" in webapp manifest is not a string but an array, an object, a boolean (true or false) or null, the device should use the name instead of short_name.

* Examples:
1. an array - "short_name": ["Json", "Array", "Test"]
2. an object - "short_name": {"Jason":"true", "Object":"true"}
3. a boolean - "short_name" : true
4. null - "short_name" : null
5. others?
Blocks: 1001861
blocking-b2g: --- → 2.2?
Whiteboard: [systemsfe]
Ben, what do you think about this?
Flags: needinfo?(bfrancis)
We could add this as an extra validation step, but there are currently a *lot* of places this would need changing so I'm not sure whether it's worth the effort?

I'm adding a method to the ManifestHelper to get "displayName" so we could improve the helper to do better sanitization of manifest properties, but currently this will only be used by the installation manager, not all the other places these properties are used.

We could start to migrate everything to use the helper and track that with a meta bug, but I'm not sure how important that is.
Flags: needinfo?(bfrancis)
(In reply to Ben Francis [:benfrancis] from comment #2)
> I'm adding a method to the ManifestHelper to get "displayName"

See bug 1137501
Doesn't Gecko sanitise manifests before they get to Gaia? Does it already do this?
(In reply to Ben Francis [:benfrancis] from comment #4)
> Doesn't Gecko sanitise manifests before they get to Gaia? Does it already do
> this?

Not sure if the code I found is correct. It only check name, description, developer name, and permission description. https://github.com/mozilla/gecko-dev/blob/master/dom/apps/AppsUtils.jsm#L367
we will fix this but it's not blocking
blocking-b2g: 2.2? → ---
tracking-b2g: --- → +
Assignee: nobody → tclancy
Depends on: 1145054
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.