Closed Bug 1825125 Opened 3 years ago Closed 2 years ago

[wpt-sync] Sync PR 39256 - [FLEDGE] Fixup joinAdInterestGroup with a <= 0 duration, add WPT test.

Categories

(Testing :: web-platform-tests, task, P4)

task

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 39256 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/39256
Details from upstream follow.

Matt Menke <mmenke@chromium.org> wrote:

[FLEDGE] Fixup joinAdInterestGroup with a <= 0 duration, add WPT test.

Previously, we'd calculate the expiration time in the renderer process,
pass that to the browser process, and after permission checks, write
that to the FLEDGE database, even if it were expired. This has a couple
problems:

  1. If the system clock went backwards, we'd revive that interest group.
    We're inevitable subject to clock changes in general, but when joining
    an expired interest group, it seems weird to let it come back.
  2. Interprocess clock skew. On Windows, at least, the times reported by
    different processes can be slightly different. By calculating expiry
    in one process, but applying it in another, it's theoretically
    possible, if unlikely, that an auction run immediately after join
    could see the "expired" interest group.
  3. Even if times are exact, if time exactly equals the expiry, we
    still consider the group valid. Theoretically, the clock could be
    the same between join time and if an auction is immediately run, so
    joining an IG with a duration of 0 and then immediately running an
    auction could return in that IG participating in the auction, with
    no clock skew or clock changes.

Issue 3) Could just be fixed by updating comparisons and updating some
tests, but this CL attempts to fix all these issues. It adds a Mojo
parameter that indicates if the join duration is \<= 0, and if either
that's the case, or the joined interest group is already expired, the
interest group is left rather than being joined. The renderer still
calls the browser's JoinInterestGroup function, so join permissions
are still checked for the calls, since allowing joinAdInterestGroup(x, 0)
but not joinAdInterestGroup(x, 1) due to permissions seems a bit strings.

Bug: 1425952
Change-Id: Ia6796bdd1efe6cea7d749de3961599a3fb99434f
Reviewed-on: https://chromium-review.googlesource.com/4377062
WPT-Export-Revision: bbe8daeac89f15b0607447b4b609f8cd7ab9a9ca

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID
Whiteboard: [wptsync downstream error] → [wptsync downstream]
You need to log in before you can comment on or make changes to this bug.