Closed Bug 1069810 Opened 10 years ago Closed 9 years ago

Homescreen application does not handle basic authentication in icon urls.

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-v2.0 affected, b2g-v2.0M affected, b2g-v2.1 affected, b2g-v2.1S affected, b2g-v2.2 fixed)

RESOLVED FIXED
2.1 S5 (26sep)
Tracking Status
b2g-v2.0 --- affected
b2g-v2.0M --- affected
b2g-v2.1 --- affected
b2g-v2.1S --- affected
b2g-v2.2 --- fixed

People

(Reporter: andreas3.larsson, Assigned: kgrandon)

References

Details

(Whiteboard: [systemsfe])

Attachments

(1 file, 1 obsolete file)

If the icon is on a server that requires basic authentication the homescreen application is unable to download it. This patch fixes the problem.
Attachment #8492048 - Flags: review?(kgrandon)
Comment on attachment 8492048 [details] [review]
patch for handling basic authentication for icons

This looks good to me, so I am going to R+, but at the same time add a commit which adds a simple unit test, and land them together. Thank you for the patch.
Attachment #8492048 - Flags: review?(kgrandon) → review+
Adding a unit test to make sure we don't regress this in the future. Carrying review.
Attachment #8492048 - Attachment is obsolete: true
Attachment #8492250 - Flags: review+
In master: https://github.com/mozilla-b2g/gaia/commit/c7ef0bf06ce1c98cbe68aa52e2ecd862acb23e9c
Assignee: nobody → andreas3.larsson
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [systemsfe]
Target Milestone: --- → 2.1 S5 (26sep)
Comment on attachment 8492250 [details] [review]
Pull request - /w unit test

I think that this will help our partners, so we should consider uplifting this to 2.1.

[Approval Request Comment]
[Bug caused by] (feature/regressing bug #): Feature implementation.
[User impact] if declined: 
[Testing completed]: Unit tested.
[Risk to taking this patch] (and alternatives if risky): Low risk.
[String changes made]: No.
Attachment #8492250 - Flags: approval-gaia-v2.1?(fabrice)
Comment on attachment 8492250 [details] [review]
Pull request - /w unit test

This patch is wrong. Please use the URL() object instead of doing string concatenation to resolve urls.
Attachment #8492250 - Flags: approval-gaia-v2.1?(fabrice) → approval-gaia-v2.1-
Hi, do you mean by using the nsIURL interface? Or this one:
https://developer.mozilla.org/en-US/docs/Web/API/URL.URL ?

Kind regards
Andreas
Flags: needinfo?(fabrice)
(In reply to andreas larsson from comment #7)
> Hi, do you mean by using the nsIURL interface? 

No, you can't use that in content code.

> Or this one:
> https://developer.mozilla.org/en-US/docs/Web/API/URL.URL ?

Yep, this one. It does everything you need properly.
Flags: needinfo?(fabrice)
Do we still want this in 2.1?
Flags: needinfo?(khu)
Hi Kai-Zhen,
Please help to land on 2.0M Thanks!
blocking-b2g: --- → 2.0M+
Flags: needinfo?(kli)
Hi Kevin,
Do you like to revise the patch per comment 6 from Fabrice? 
Is this patch good for 2.0M?
Thanks!
Flags: needinfo?(kgrandon)
Flags: needinfo?(jocheng)
Well it looks like it's already in 2.0m. I think it should work, but we could always refactor it to address comment 6. Unfortunately I won't have time to do this right now, but if the patch author or someone else wants to do it - feel free to flag me for review. It looks like this was never a 2.1 blocker so I'm not sure if it's needed?
Flags: needinfo?(kgrandon)
Hi Kevin,
I suppose the change would be:

line 199 of shared/elements/gaia_grid/js/items/grid_item.js

[from] 
  icon = this.app.origin + icon;
[to]
  icon = new URL(icon, this.app.origin);

Is this correct? Thanks!
Flags: needinfo?(kgrandon)
You should write a unit test and verify that the argument order is correct - I'm not sure if it is.
Flags: needinfo?(kgrandon)
You should rather resolve the url against the manifest url, not the origin.
See Also: → 1126709
Flags: needinfo?(jocheng)
Depends on: 1126709
Hi Kai-Zhen,
I am sorry that this fix is incompleted and we need to backout this from 2.0M and wait until I fix bug 1126709.
Thanks!
blocking-b2g: 2.0M+ → ---
Flags: needinfo?(kli)
(In reply to Josh Cheng [:josh] from comment #17)
> Hi Kai-Zhen,
> I am sorry that this fix is incompleted and we need to backout this from
> 2.0M and wait until I fix bug 1126709.
> Thanks!

Why are we spending so much time on this? I don't think it was ever deemed a blocker and I'm not sure we have a good use case for it?
Reopen it based on last few comments. 
After the triage with device group, we decided not to + for 2.0 and 2.1.
Assignee: andreas3.larsson → kgrandon
Status: RESOLVED → REOPENED
Ever confirmed: true
Flags: needinfo?(khu)
Resolution: FIXED → ---
(In reply to Kevin Hu [:khu] from comment #20)
> Reopen it based on last few comments. 
> After the triage with device group, we decided not to + for 2.0 and 2.1.

The proper workflow here is to set the branch specific flags and not re-open if it wasn't backed out on master.
Status: REOPENED → RESOLVED
Closed: 10 years ago9 years ago
Flags: needinfo?(khu)
Resolution: --- → FIXED
Thanks.
Flags: needinfo?(khu)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: