Closed Bug 1110138 Opened 10 years ago Closed 8 years ago

SMS application accepts invalid URLs in Share URL activity

Categories

(Firefox OS Graveyard :: Gaia::SMS, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: oteo, Unassigned)

References

Details

See https://bugzilla.mozilla.org/show_bug.cgi?id=1109686#c8. In Loop application, when we use the option "other" to share a URL, we invoke the "Share URL" activity, which should only accept 1 attribute: the URL. The fact is that SMS is currently accepting in the "Share URL" activity Strings that are not valid URLs (e.g. a text + a URL) and we believe it shouldn't.
Summary: Share URL activities accepts invalid URLs → SMS application accepts invalid URLs in Share URL activity
See Also: → 1109686
Hey Maria, can you precise what your expectation is? * Should the SMS app be hidden in the menu if the payload is not only a URL? * Should the SMS app reject the payload? * Should the SMS app detects the URL inside the payload and use it only?
Flags: needinfo?(oteo)
My two cents :) I think apps should check if they are receiving an URL or not when the activity is "share" type "url". IMHO a new type should be created with type "text/plain" if we want to send text + URL (our use case). This is my point of view being purist. My option will be "Appa reject the payload because the URL type was used and really other stuff was sent". No idea about Maria's opinion although maybe we are in the same page. What is you opinion Julien? Thanks a lot for paying attention on this bug (In reply to Julien Wajsberg [:julienw] from comment #1) > Hey Maria, can you precise what your expectation is? > > * Should the SMS app be hidden in the menu if the payload is not only a URL? > * Should the SMS app reject the payload? > * Should the SMS app detects the URL inside the payload and use it only?
(In reply to Cristian Rodriguez (:crdlc) from comment #2) > My two cents :) I think apps should check if they are receiving an URL or > not when the activity is "share" type "url". IMHO a new type should be > created with type "text/plain" if we want to send text + URL (our use case). > This is my point of view being purist. My option will be "Appa reject the > payload because the URL type was used and really other stuff was sent". No > idea about Maria's opinion although maybe we are in the same page. Thanks! and yes, I agree with what Cristian says. We filed this bug in case this could be a potential issue for SMS application or for apps using the share activity. In any case, if you believe there is no real issue here, and that the best thing we can do is keeping current behaviour please close this as invalid.
Flags: needinfo?(oteo)
Hey Jonas, do you think such check should be done in Gecko or the System app? It seems to me it would be better to have this in a centralized code rather than have this in every app.
Flags: needinfo?(jonas)
The problem is that on the Gecko side we have very little knowledge about what information is passed through activities. So it'd be very hacky to try to figure out what should or should not be a valid URL. So I'd suggest doing the checking on the gaia side.
Flags: needinfo?(jonas)
Hey Jonas, Here we have a specific mime type that is "url". And Gecko should already have some working code to check valid URL. That's why I thought it could be a good idea.
Flags: needinfo?(jonas)
The problem is that to Gecko this is just a big JSON object. We don't know which property contains a mime type, which property contains the value which that mime type applies to, and which property is just some arbitrary other information.
Flags: needinfo?(jonas)
Mass closing of Gaia::SMS bugs. End of an era :(
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Mass closing of Gaia::SMS bugs. End of an era :(
You need to log in before you can comment on or make changes to this bug.