Skip to content

Preserve and report legend URL bounds after login inheritance #2198

Closed

Description

@giswqs

A same-origin advertised legend URL can fit the 4096-byte limit before login inheritance, then exceed it when spaces are encoded. crates/map/src/tiles.rs::checked_legends filters login_address::inner(&l.url).len() <= MAX_LEGEND_URL without reporting the dropped legend; login_address::as_sent expands spaces to %20. Current main does not contain the previously claimed advertised_len helper.

Reproduce with an authenticated service advertising a same-origin legend just below 4096 raw bytes containing spaces. Compare its advertised byte length, inherited URL length, and checked_legends output. Decide the bound explicitly, retain valid advertised links when appropriate, and send a counted notice when a legend is refused. Cover both near-limit encoded-space and genuinely over-limit cases, retaining the login binding.

Found in the release sweep against ce40749; larger than a wording cleanup because the original-length provenance and notice channel cross data/map/service readers.

Source: #1625 (comment)
Related data feedback: #1625

Duplicate search: existing open legend issues and all-state legend length search found no issue covering this boundary.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions