Skip to content

Fix Price item searches from encoded and compressed trade URLs - #2506

Open
Kanaxai wants to merge 4 commits into
PathOfBuildingCommunity:devfrom
Kanaxai:fix-price-item-trade-urls
Open

Fix Price item searches from encoded and compressed trade URLs#2506
Kanaxai wants to merge 4 commits into
PathOfBuildingCommunity:devfrom
Kanaxai:fix-price-item-trade-urls

Conversation

@Kanaxai

@Kanaxai Kanaxai commented Sep 7, 2026

Copy link
Copy Markdown

Description of the problem being solved:

Clicking "Price item" with a working trade website URL can return HTTP 404. Encoded league names are escaped a second time (Forbidden%20Rites becomes Forbidden%2520Rites), and gzip/base64url share queries are sent to the saved-search lookup endpoint as if they were search IDs.

Decode the league path segment before building API URLs. Decode compressed share queries locally, wrap the filters in the API query object, and submit them through the existing search/fetch flow. Preserve weight sorting and saved-search URL support, and return errors for invalid URLs or malformed queries. The gzip decoder uses the existing zlib library through LuaJIT FFI with a 1 MiB output limit.

Steps taken to verify a working solution:

  • The reporter confirmed that "Price item" works with the original failing URL after applying the fix in the Windows app.
  • Seven focused Lua regression checks pass, including the exact compressed payload, repeated searches, single league encoding, legacy saved-search URLs, and malformed inputs.
  • Adapted the regression tests to current dev class initialization and reran all seven using the bundled Windows LuaJIT and zlib runtime through a minimal test harness.
  • Whitespace checks pass. The full Busted suite and Linux runtime have not been run locally.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant