Repository navigation
Conversation
The AVE records base URL was a hardcoded constant used at six call sites, each building its own URL, plus a literal in the report footer. - bawbel.aveApiUrl setting (default https://api.aveproject.org), with a schema pattern so the Settings UI rejects non-http(s) values - core/urls.ts (no vscode import): resolveAveApiUrl() parses the value with URL, requires http(s) and a host, and rebuilds it from origin and path; anything else gives the default. A crafted value cannot reach a link or the report HTML unescaped - core/links.ts: aveRecordLink() and aveRecordsIndexLink(), the only places that build AVE links; the report footer also escapes the URL - README settings table and CHANGELOG Closes #54 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: chaksaray <chaksaray@gmail.com>
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #54
What and why
The extension's AVE base URL was a hardcoded constant (
AVE_RECORDS_BASE) used at six call sites, each building its own records URL, plus a literal in the report footer. Following the "one place, configurable, validated" rule:bawbel.aveApiUrl, defaulthttps://api.aveproject.org, withpattern: ^https?://so the Settings UI flags a bad valuecore/urls.ts(novscodeimport, so it runs in plain Node):resolveAveApiUrl()parses the value withnew URL(), requireshttp:/https:and a host, and rebuilds the base from origin and path (percent-encoded, no query or fragment, no trailing slash). Anything else gives the defaultcore/links.ts:aveRecordLink(id)andaveRecordsIndexLink()are the only code that builds AVE links. Hover, diagnostic codes, the quick action, the open command, and the report footer all use themescapeHtmlDEFAULT_AVE_API_URLincore/types.tsis the one remaining literalAction inputs and outputs
Not changed (extension only).
Checks
develop has no extension test runner; your #15 adds vitest. When it lands, these resolver cases belong in a unit test.
examples/usebawbel/integrations@v1