Skip to content

Start the crawl where the browser login landed - #271

Merged
xroche merged 4 commits into
masterfrom
login-name-landed-address
Nov 3, 2026
Merged

xroche merged 4 commits into
masterfrom
login-name-landed-address

Conversation

@xroche

@xroche xroche commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

The login window is there to pass a form and stop on the page to be copied, so that page is where the crawl starts. The address field now carries it in place of the address the window was opened for. The crawl therefore starts wherever the login ends, and the bundle's scope follows that host.

Credentials typed in the address field follow only when the login stayed on their own host. A login can end on a sign-on provider, which has no business being sent them.

The engine refuses an address it cannot name, such as a callback carrying a long token. The opened address is offered after the landed one, so the login still saves.

This replaces part of #262. WinHTTrack already names the landed address and overwrites the typed one, so the two front ends now agree.

xroche and others added 4 commits November 3, 2026 14:57
The login window is there to pass a form and stop on the page to be
copied, so that page is the crawl's root. The address field now carries
it in place of the address the window was opened for, which is only the
way in.

Credentials typed in the address field follow only when the login stayed
on their own host. A login can end on a sign-on provider, and that
provider has no business being sent them.

This replaces part of #262, which named the opened address after #260
had added the landed one as a second crawl root. Naming the landed
address in place of the typed token keeps the field to one root either
way. WinHTTrack already names the landed address and overwrites the
typed one, so the two front ends now agree.

Signed-off-by: Xavier Roche <roche@httrack.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A review found the landed address can be one the engine refuses. It
caps the address length, and a sign-on callback carrying a long token
goes past that cap. The login then saved nothing where it used to save,
and the message named no cause. The window now offers the landed
address first and the opened one after, so a refusal still leaves a
login to save.

The host match that keeps a typed password off another host now trims a
trailing dot, because the engine trims one too. Without that, a field
holding user:pw@a.example. lost the password.

The decision moved into BrowserLoginPolicy, where a test can reach it.
The old test read the activity's source text, so it passed a mutant
that reverted the change and failed one that only reworded it.

Signed-off-by: Xavier Roche <roche@httrack.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The engine cuts a trailing host dot, so the address it writes never
carries one and trimming that side changed nothing. A mutation that
dropped it left every test green.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
This file already used "bundle URL" for the start URL the engine WROTE,
which carries the bundle name. The new helper meant the reverse, the
addresses offered TO the engine, and the window used both senses eleven
lines apart.

Two review mutants reverted the change and kept every test green: one
passed the opened address inside the loop, the other took the last
accepted address instead of the first. The window test now pins both.
The table of refused addresses gained the positive control it lacked,
so it can no longer pass an implementation that never offers a landed
address at all.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
@xroche
xroche merged commit 64aec85 into master Nov 3, 2026
7 checks passed
@xroche
xroche deleted the login-name-landed-address branch November 3, 2026 19:23
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.

1 participant