Repository navigation
Conversation
…rget list A BOM at the start of a -l list stayed attached to the first target, which made it invalid and silently dropped it. Trim a leading U+FEFF from the first line. Closes projectdiscovery#8428. Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>
Closes projectdiscovery#8428. Co-authored-by: GeneralTony007 <144252170+GeneralTony007@users.noreply.github.com>
Contributor
|
Warning Review limit reachedThis review ran on the open-source allowance, not this organization's plan, because the pull request author doesn't have an assigned seat. Waiting won't change this — ask an organization admin to assign them a seat, or add seats in Billing if every seat is already assigned, then retry. Next included review available in 19 minutes. View limit details
|
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.
A target list saved with a UTF-8 byte order mark loses its first target: it is counted in "Targets loaded" but never requested, with no error.
scanInputFromReaderpassed the first line toaddInputwith the BOM (U+FEFF) still attached, which made the target invalid.Fix: trim a leading U+FEFF from the first line only.
Test:
TestScanInputFromReaderStripsByteOrderMarkloads a BOM-prefixed list and checks both targets come out. It fails before the fix and passes after.go test ./pkg/input/...passes.Closes #8428