Prevent invalid ParsedCookie modifications.
After https://chromium-review.googlesource.com/c/chromium/src/+/1982549, we treat cookies with neither names nor values as invalid. This patch adjusts `ParsedCookie::SetName()` and `ParsedCookie::SetValue()` to ensure that a `ParsedCookie` can't be modified into an invalid cookie. It also applies the rule to `CanonicalCookie::CreateSanitizedCookie` to ensure that code path has the same restrictions. Bug: 1040296 Change-Id: I1e57c3ee8a4f6dc222c35d6e9844928c1ba7fb06 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1993962 Commit-Queue: Mike West <mkwst@chromium.org> Reviewed-by:Lily Chen <chlily@chromium.org> Cr-Commit-Position: refs/heads/master@{#733943}
Showing
Please register or sign in to comment