Bug 1515006 [wpt PR 14584] - SignedExchange: Use unparsed URL string for signature...
commit1921c1ffbc72e91c59e0fead3fccb8d71231784d
authorKunihiko Sakamoto <ksakamoto@chromium.org>
Thu, 31 Jan 2019 12:12:47 +0000 (31 12:12 +0000)
committerJames Graham <james@hoppipolla.co.uk>
Tue, 5 Feb 2019 17:52:20 +0000 (5 17:52 +0000)
tree6509ca1bc1a9bb4bfb6783d925266cb01c7e250e
parentfd1f5d434565a6f9f03aa4cd31747ff2923602ba
Bug 1515006 [wpt PR 14584] - SignedExchange: Use unparsed URL string for signature verification, a=testonly

Automatic update from web-platform-tests
SignedExchange: Use unparsed URL string for signature verification

Before this patch, SignedExchangeSignatureVerifier used GURL::spec()
to stringify URLs when reconstructing the signed message. However,
GURL::spec() may return a string which is differently percent-encoded
from the original URL string, and then verification fails.

This patch introduces URLWithRawString struct which holds original
URL string along with parsed GURL, and use the original string
for signature verification.

Bug: 914247
Change-Id: I8950bf172391782ebb92338707245694b046052f
Reviewed-on: https://chromium-review.googlesource.com/c/1377959
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Commit-Queue: Kunihiko Sakamoto <ksakamoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617714}

--

wpt-commits: 2e19cbe5d5d74821056d4ae2cef435accefaf4ef
wpt-pr: 14584
testing/web-platform/tests/signed-exchange/resources/generate-test-sxgs.sh
testing/web-platform/tests/signed-exchange/resources/sxg-inner-url-bom.sxg [new file with mode: 0644]
testing/web-platform/tests/signed-exchange/resources/sxg-inner-url-bom.sxg.headers [new file with mode: 0644]
testing/web-platform/tests/signed-exchange/resources/sxg-utf8-inner-url.sxg [new file with mode: 0644]
testing/web-platform/tests/signed-exchange/resources/sxg-utf8-inner-url.sxg.headers [new file with mode: 0644]
testing/web-platform/tests/signed-exchange/sxg-inner-url-bom.tentative.html [new file with mode: 0644]
testing/web-platform/tests/signed-exchange/sxg-utf8-inner-url.tentative.html [new file with mode: 0644]