Skip to content

fix(data-tools): require consent for interval refresh and restrict fetch to http(s) - #2

Open
0xtlt wants to merge 2 commits into
mainfrom
fix/harden-web-data-import
Open

0xtlt wants to merge 2 commits into
mainfrom
fix/harden-web-data-import

Conversation

@0xtlt

@0xtlt 0xtlt commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

A workbook's interval no longer starts the refresh timer by itself. Opening asks once, with the same prompt as refresh-on-open. Declining leaves the timer stopped; Refresh still works. Agreeing, or turning the interval on in Connection Properties, starts it.

Web fetches accept only http and https. file:// and bare paths are rejected with an error. Redirects are followed only while they stay on those two schemes, and at most ten of them.

Fetching is done in process with ureq and rustls. The client sends Accept-Encoding: gzip, deflate, br and decompresses the body. A connect timeout of 10s and an overall timeout of 30s still apply, and HTTP_PROXY / HTTPS_PROXY / ALL_PROXY are honoured. ureq is a small blocking client, so the fetch stays off the window thread without a second async runtime. TLS is the rustls stack GPUI already links, with the Mozilla root set, which builds the same way on macOS, Windows and Linux. GPUI's own HTTP client is an async fork of reqwest and does not enable gzip, brotli or deflate, so it is not reused; the public reqwest crate would not replace that fork.

Local file import stays a separate, explicit action. Text/CSV connections still re-read the file they name, including on Refresh and, after the same consent, on a timer: that path never goes through the web fetch. JSON, XML and workbook imports the user picks in the file dialog still load and can be refreshed during that session. A web query that arrives inside a workbook cannot read a local path on its own; after the file is opened again, that address is refused until the user picks the file again (Change File Path, or a new import).

This stays on the same branch as the consent and protocol fix. The client is how that restriction is enforced, so a second pull request would review one fetch path twice.

Noted from item 1 of https://gist.github.com/TeamDijon/1ea7db06524264dd5b1851aac2642168 (review of 90a5e28).

Open in Web Open in Cursor 

cursoragent and others added 2 commits October 17, 2026 05:40
…tch to http(s)

A stored interval no longer starts the web refresh timer without the same
consent prompt as refresh-on-open. Web fetches accept only http and https.

Co-authored-by: Thomas <0xtlt@users.noreply.github.com>
Web queries are fetched with ureq and rustls instead of a system
curl binary. The request asks for gzip, deflate and brotli and the
body is decompressed. Connect and overall timeouts, the ten-redirect
cap, and the http(s)-only rule on the address and on redirects stay
in place. Consent for a scheduled refresh is unchanged.

ureq is blocking, which matches fetch() on the background executor,
and it reuses the rustls stack GPUI already links. GPUI's zed-reqwest
fork is async and does not enable compression.

Co-authored-by: Thomas <0xtlt@users.noreply.github.com>
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.

2 participants