Open Bug 1633289 Opened 4 years ago Updated 10 months ago

Upgrade rust-url to 2.4.0

Categories

(Core :: Networking, task, P3)

task

Tracking

()

People

(Reporter: lina, Assigned: valentin)

References

(Depends on 1 open bug, Blocks 1 open bug, )

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file, 2 obsolete files)

In bug 1626506, we tried to vendor a crate that depends on url v2.1.1, while m-c currently vendors 2.1.0. This caused lots of assertions inside PrincipalVerifier::IsPrincipalInfoValid, like:

0:04.67 pid:94821 [94821, Main Thread] WARNING: originNoSuffix (file://///index.html) doesn't match passed one (file:///index.html)!: file /Users/lina/Code/gecko/dom/quota/ActorsParent.cpp, line 10420
0:04.67 pid:94821 Assertion failure: IsPrincipalInfoValid(principalInfo), at /Users/lina/Code/gecko/dom/quota/ActorsParent.cpp:10453

As well as the MozURL GTest, where BaseDomainsEqual returns false for these:

1 = indexeddb://fx-devtools/, 2 = indexeddb://fx-devtools
1 = indexeddb://fx-devtools/#x, 2 = indexeddb://fx-devtools#x

Jan, can we change PrincipalVerifier::IsPrincipalInfoValid to handle the new normalized origin format? I tried changing it to call QuotaManager::IsPrincipalInfoValid, since the logic looked super similar, but that caused a bunch of test failures, too (unexpected successes and "cannot find matching entry" in the IDB and QM tests).

Valentin, should we update netwerk/test/gtest/urltestdata.json with those new origins, or is there another fix we need here?

As a workaround, we can change webext_storage to depend on url 2.1.0 for now, but it would be great to bump the m-c version eventually.

Flags: needinfo?(valentin.gosu)
Flags: needinfo?(jvarga)

(In reply to :Lina Cambridge from comment #0)

Valentin, should we update netwerk/test/gtest/urltestdata.json with those new origins, or is there another fix we need here?

If we update to 2.1.1 I believe we should be updating it to be the same as the tests we pass in rust-url:
https://github.com/servo/rust-url/blob/master/tests/urltestdata.json

As a workaround, we can change webext_storage to depend on url 2.1.0 for now, but it would be great to bump the m-c version eventually.

I also wanted to make the upgrade soon, but I don't know if I'll be able to get to it in the next month.

Flags: needinfo?(valentin.gosu)
Priority: -- → P3
Whiteboard: [necko-triaged]
Severity: -- → N/A

The latest version is 2.2.2.

Summary: Upgrade rust-url to 2.1.1 → Upgrade rust-url to 2.2.2

I'm not sure what can be done here at this point. From storage perspective, we could try to unify the way we generate origin and domain strings. Currently we use both, MozURL (off main thread) and nsIPrincipal (on the main thread).

Flags: needinfo?(jvarga)
Blocks: 1603699
Summary: Upgrade rust-url to 2.2.2 → Upgrade rust-url to 2.3.1
Assignee: nobody → valentin.gosu
Summary: Upgrade rust-url to 2.3.1 → Upgrade rust-url to 2.4.0

Depends on D186796

Attached file Bug 1633289 - Vendor rust-url 2.4.0 r=#necko (obsolete) (deleted) —

Depends on D186797

Attachment #9350146 - Attachment description: Bug 1633289 - Upgrade rust-url to 2.4.0 r=#necko → Bug 1633289 - Upgrade rust-url to 2.4.1 r=#necko
Attachment #9350147 - Attachment is obsolete: true
Attachment #9350148 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: