fix(app): collection connects only to the addresses it checked, within 15 s, logging no address

- the fetcher resolves once, requires every address to be public and connects only to those
  (TLS still checks the name), so DNS rebinding cannot reach the local network; redirects too
- 15 s for the whole fetch also against servers that send slowly; no URL in any log line
- a site whose title alone changed is kept again
- target names that differ only in case are refused (one Windows folder)
- the worker always gets the collection file, so results older than the keep days go also
  with no targets or the feature off
- the results screen lists every target with results, not only those in the newest 100

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-13 21:39:04 +09:00
parent b94e9dc112
commit 9185265010
10 changed files with 273 additions and 66 deletions

View File

@@ -286,11 +286,10 @@ async function collectResults() {
const list = h("div");
const load = async () => {
try {
const items = await api("collect_results", { target: pick.value || null, limit: 100 });
if (!pick.value) {
for (const name of new Set(items.map((i) => i.target)))
if (![...pick.options].some((o) => o.value === name)) pick.append(h("option", { value: name }, name));
}
const r = await api("collect_results", { target: pick.value || null, limit: 100 });
const items = r.items;
for (const name of r.targets)
if (![...pick.options].some((o) => o.value === name)) pick.append(h("option", { value: name }, name));
list.replaceChildren(items.length ? h("table", {}, h("tbody", {}, items.map((i) => h("tr", {},
h("td", { class: "small muted" }, (i.at || "").replace("T", " ").slice(0, 16)),
h("td", { class: "small" }, i.target),