Closed Bug 1172701 Opened 5 years ago Closed 4 years ago

GetSubresourceURI should properly compute the resource path

Categories

(Core :: Networking, defect)

41 Branch
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox41 --- affected
firefox43 --- fixed

People

(Reporter: valentin, Assigned: valentin)

References

Details

Attachments

(1 file)

Currently, the resource path is simply appended to the package path.
We should make sure the path is normalized, and that it can't escape the package's namespace.
Comment on attachment 8646110 [details] [diff] [review]
Make GetSubresourceURI normalize the path for packaged resources

Review of attachment 8646110 [details] [diff] [review]:
-----------------------------------------------------------------

::: netwerk/protocol/http/PackagedAppService.cpp
@@ +337,5 @@
> +  {
> +    // We use this temp URI to generate a path that is relative
> +    // to the package URI and not to the root of the domain.
> +    nsCOMPtr<nsIURI> tempURI;
> +    NS_NewURI(getter_AddRefs(tempURI), "http://temp-domain/");

temp-domain.local - jic
Attachment #8646110 - Flags: review?(mcmanus) → review+
https://hg.mozilla.org/mozilla-central/rev/846e76b0e711
Status: NEW → RESOLVED
Closed: 4 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in before you can comment on or make changes to this bug.