New issue
Advanced search Search tips

Issue 916390 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 20
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

SignedExchange: Reject SXG if fallback URL has invalid UTF-8 sequence

Project Member Reported by ksakamoto@chromium.org, Dec 19

Issue description

This is another bug found while creating tests for https://github.com/WICG/webpackage/pull/346.

https://localhost:8443/sxg/invalid-utf8-inner-url.sxg?v=1b2&ot=true

The fallback URL of this sxg is "https://sxg.irorin.org/\xce\xce\xa9.html" (invalid UTF-8 sequence in the path). Currently Chromium can load this sxg, but it must fail because "UTF-8 decode without BOM or fail" on fallbackUrlBytes returns failure.


 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/772250a93f51155cb5f434b6fbe0e03c7261cf2d

commit 772250a93f51155cb5f434b6fbe0e03c7261cf2d
Author: Kunihiko Sakamoto <ksakamoto@chromium.org>
Date: Wed Dec 19 08:58:05 2018

SignedExchange: Reject SXG if fallback URL has invalid UTF-8 sequence

GURL parser happily accepts invalid UTF-8 path, so we need to validate
the fallback URL string before parsing.

Spec: https://github.com/WICG/webpackage/pull/346

Bug:  916390 
Change-Id: Ife25621e2a41beef01cbf36a5ab523eaee1ea222
Reviewed-on: https://chromium-review.googlesource.com/c/1382724
Commit-Queue: Kunihiko Sakamoto <ksakamoto@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617772}
[modify] https://crrev.com/772250a93f51155cb5f434b6fbe0e03c7261cf2d/content/browser/web_package/signed_exchange_prologue.cc
[modify] https://crrev.com/772250a93f51155cb5f434b6fbe0e03c7261cf2d/third_party/blink/web_tests/external/wpt/signed-exchange/resources/generate-test-sxgs.sh
[add] https://crrev.com/772250a93f51155cb5f434b6fbe0e03c7261cf2d/third_party/blink/web_tests/external/wpt/signed-exchange/resources/sxg-invalid-utf8-inner-url.sxg
[add] https://crrev.com/772250a93f51155cb5f434b6fbe0e03c7261cf2d/third_party/blink/web_tests/external/wpt/signed-exchange/resources/sxg-invalid-utf8-inner-url.sxg.headers
[add] https://crrev.com/772250a93f51155cb5f434b6fbe0e03c7261cf2d/third_party/blink/web_tests/external/wpt/signed-exchange/sxg-invalid-utf8-inner-url.tentative.html

Status: Fixed (was: Assigned)

Sign in to add a comment