Closed troyhunt closed 1 year ago
Looks like an oversight in the implementation of the FileStream
, ReadLineAsync
returns a string.Empty
when the end of the file is reached. So when an empty line is reached in the middle of the file, it was assumed to be the end. Replaced with a call to check StreamReader.EndOfStream
Fixed in #32
Legend, perfect!
Just went to run this app against a new breach and it immediately returned zero records. It looks like if there's a blank line in the file the parsing bails out. I've added a failing test in https://github.com/HaveIBeenPwned/EmailAddressExtractor/commit/2c3231dc1a525c270cf07d3ed916ca47c0687a64.