The web client resolved relative link[rel=manifest] hrefs by naive string joining, so a page at https://rememorize.5apps.com with href="./manifest.webmanifest" produced https://rememorize.5apps.com/./manifest.webmanifest. That literal /./ path was sent to the server, and servers that do not normalise dot segments (5apps runs openresty) answered with 404. The manifest was never loaded, and metadata silently fell back to nothing.
This change resolves relative hrefs against the document URL with URI.join (RFC 3986), which collapses dot segments and also handles bare relative paths and nested document URLs correctly. Absolute manifest URLs are passed through unchanged, and icon src values are untouched.
A regression spec covers a page whose manifest href is ./manifest.webmanifest, asserting the manifest is fetched as a hash and that only the clean resolved URL is requested. WebMock normalises dot segments when matching requests, so the spec additionally captures the URL handed to the HTTP layer, keeping the regression meaningful.
Version bumped to 1.1.1. The bug was triggered in production by rememorize.5apps.com.
The web client resolved relative `link[rel=manifest]` hrefs by naive string joining, so a page at `https://rememorize.5apps.com` with `href="./manifest.webmanifest"` produced `https://rememorize.5apps.com/./manifest.webmanifest`. That literal `/./` path was sent to the server, and servers that do not normalise dot segments (5apps runs openresty) answered with 404. The manifest was never loaded, and metadata silently fell back to nothing.
This change resolves relative hrefs against the document URL with `URI.join` (RFC 3986), which collapses dot segments and also handles bare relative paths and nested document URLs correctly. Absolute manifest URLs are passed through unchanged, and icon `src` values are untouched.
A regression spec covers a page whose manifest href is `./manifest.webmanifest`, asserting the manifest is fetched as a hash and that only the clean resolved URL is requested. WebMock normalises dot segments when matching requests, so the spec additionally captures the URL handed to the HTTP layer, keeping the regression meaningful.
Version bumped to 1.1.1. The bug was triggered in production by rememorize.5apps.com.
Resolve the manifest href against the document URL using URI.join
(RFC 3986) instead of naive string concatenation. The previous approach
produced URLs with dot segments like /./manifest.webmanifest, which
servers that do not normalise dot segments (e.g. 5apps/openresty)
reject with a 404, silently breaking manifest metadata.
Version 1.1.1.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The web client resolved relative
link[rel=manifest]hrefs by naive string joining, so a page athttps://rememorize.5apps.comwithhref="./manifest.webmanifest"producedhttps://rememorize.5apps.com/./manifest.webmanifest. That literal/./path was sent to the server, and servers that do not normalise dot segments (5apps runs openresty) answered with 404. The manifest was never loaded, and metadata silently fell back to nothing.This change resolves relative hrefs against the document URL with
URI.join(RFC 3986), which collapses dot segments and also handles bare relative paths and nested document URLs correctly. Absolute manifest URLs are passed through unchanged, and iconsrcvalues are untouched.A regression spec covers a page whose manifest href is
./manifest.webmanifest, asserting the manifest is fetched as a hash and that only the clean resolved URL is requested. WebMock normalises dot segments when matching requests, so the spec additionally captures the URL handed to the HTTP layer, keeping the regression meaningful.Version bumped to 1.1.1. The bug was triggered in production by rememorize.5apps.com.