Repository navigation
Start the crawl where the browser login landed - #271
Merged
Merged
Conversation
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>
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.
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.