Merged
Conversation
…e-based authentication, and improved filename resolution for Firefox
…tion or class' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
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.
Greptile Summary
This PR adds custom DNS server configuration (plumbed through the Go download engine via
ConfigureDialer), enhances both browser extensions with redirect chain tracking and cookie-based authentication, and improves Firefox filename resolution via polling. The Go-side changes are clean: thedns.goutility correctly uses a separate inner dialer to avoid recursive resolution, and the probe client cache key was fixed to use quoted values to prevent separator collision.Confidence Score: 5/5
Safe to merge; the single finding is a P2 edge case in the Firefox duplicate-download notification path that falls back gracefully.
All P0/P1 concerns from previous review rounds are addressed (recursive DNS fixed, cache key collision fixed). The only remaining finding is a P2: filename polling in Firefox's duplicate path fires after erase, but the fallback to URL-based extraction means functionality is not broken, just slightly degraded for an uncommon code path.
extension-firefox/background.js — resolveFilename ordering in duplicate handler
Vulnerabilities
!!cookieString), not the actual values — no accidental secret exposure in logs.getCookiesAsHeaderreads from the browser's own cookie store (scoped to the URL) and forwards to a locally-running Surge instance, which is the intended trust boundary.Important Files Changed
Sequence Diagram
sequenceDiagram participant B as Browser (FF/Chrome) participant EXT as Extension BG Script participant RC as redirectChains Map participant CS as Cookie Store participant S as Surge Server participant DNS as Custom DNS B->>EXT: onBeforeRedirect(url → finalUrl) EXT->>RC: set(originUrl, {finalUrl, ts}) B->>EXT: onCreated / onDeterminingFilename EXT->>RC: resolveDownloadUrl(originalUrl) RC-->>EXT: finalUrl EXT->>CS: getCookiesAsHeader(finalUrl) CS-->>EXT: cookieString EXT->>S: POST /download {url: finalUrl, headers: {Cookie: ...}} S->>DNS: resolve host via CustomDNS (if configured) DNS-->>S: IP S-->>EXT: {success: true}Prompt To Fix All With AI
Reviews (2): Last reviewed commit: "Potential fix for pull request finding '..." | Re-trigger Greptile