Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

5.1 KB
Raw Blame

Download URLs are now logged in redacted form (scheme://host:port only) across the downloader stack, the download service and safe_get/safe_post/SafeSession, and in the library router's queue-all and download routes and the link-analytics metrics: these web-sourced URLs can carry credentials in their userinfo or presigned tokens in query strings, which previously landed in server logs. This covers fetch failure and refusal logs as well as the attempt and progress lines written before every fetch, at every log level. Fetch failure handlers for web-sourced URLs no longer attach tracebacks or exception messages (request errors embed the full URL even with diagnose=False) and log only the exception type; the OpenAlex and Semantic Scholar API-lookup handlers, whose requests go to app-built API URLs, still log the exception text after credential scrubbing (database persistence errors, whose SQLAlchemy text can echo the stored URL, are tracked separately in #6829). Download failure reasons that the library routes and the retry classifier log are withheld when they contain any URL-part delimiter (/ \ ? # @ ;), including fixed reasons that happen to contain one, and a rate-limit failure's domain no longer includes userinfo, nor do the domains the domain classifier and the link-analytics metrics derive from stored resource URLs (which it logged and persisted as the classification key, and whose failure handlers now log only the exception type), nor do the domains the library page's domain filter, its research PDF previews and the collection search results show (the domain filter still finds a credentialed URL by its host). All of these domains and keys come from one helper that returns an empty domain for a missing (NULL) URL instead of raising. When a password or username holds an unencoded /, ? or #, the parser ends the host inside the userinfo; the redacted log form, these domains and keys, the downloaders' rate-limit keys and the SSRF validator's resolution-failure and resolves-to-private log lines (which no longer print the parsed host) then show a placeholder or an empty domain instead of that userinfo fragment whenever an @ follows the parsed host in the URL as written (a dot segment such as /../, which the parser removes from the path, does not hide it: https://tok/en@host/../a is redacted) and either the parsed authority itself still holds a userinfo (a password holding an unencoded @ before the delimiter, as in https://admin:[email protected]#1@host/, whose parsed host ss.example is the password's tail; this applies to localhost and IP literals too), or the parsed host is a single label or carries a port (localhost and IP literals excepted). The remaining ambiguous shapes are a userinfo with no @ before its first /, ? or # that is either a dotted name with no digits-only port (https://john.doe/x@host/, https://john.doe:#pw@host/) or localhost / an IP literal (https://127.0.0.1:80/x@host/): these cannot be told apart from a real host with an @ in its path (https://medium.com/@user) and are shown as parsed, which can surface the username and, in the IP/localhost case, a digits-only password prefix. A real host with an explicit port and an @ later in the URL (https://git.example:8443/@user), and any URL with userinfo and an @ later in it (https://user:[email protected]/@group), are now logged as https://<redacted>, get an empty domain and share the invalid_authority rate-limit key; uncredentialed URLs with an @ in the path or query on a dotted host (https://medium.com/@user, https://a.example/[email protected]) are unaffected. Domain classifications persisted before this change under a key that includes userinfo are not migrated: those rows keep their credentialed key, and the next classification run classifies the domain again under its clean key. The LLM rate-limit key drops userinfo too, and the LLM wrapper's local-endpoint debug line logs the redacted base URL; this is preventive, as LLM rate limiting is currently disabled and the key is not used. The download service's own log lines for a PDF download's skip or failure reason go through the same withholding as the library routes'. The bulk download route's exception handler logs only the exception type, not its message, which can echo the resource URL. The exception messages raised by safe_get/safe_post/SafeSession (SSRF refusals, redirect refusals, too-many-redirects, and require_https scheme and downgrade refusals) are redacted at source. The retry-refusal log lines (queue-all's skip line and the download service's text-extraction skips) withhold their reason the same way, because a resource permanently failed before this change keeps its stored failure message, which can hold the rate-limited URL's userinfo; the reason returned to the requesting user is unchanged. The failed-text-extraction record's log lines and the document scheduler's text-extraction log lines withhold the failure reason too, and the document scheduler logs only the exception type for an error while processing a resource. The extraction pipeline also withholds skip reasons in its fallback and terminal-failure logs, including the batch path.