gh-88843: Do not allow to parse line breaks between quotes in sniffer regexes.#27256
gh-88843: Do not allow to parse line breaks between quotes in sniffer regexes.#27256ptokarski wants to merge 1 commit into
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
|
This PR is stale because it has been open for 30 days with no activity. |
|
ptokarski has signed CLA, but piotr-profound has not. |
This comment was marked as resolved.
This comment was marked as resolved.
|
This PR is stale because it has been open for 30 days with no activity. |
|
This PR is stale because it has been open for 30 days with no activity. |
|
Thank you for the patch, and sorry for the long delay. On the main branch the sniffer was rewritten (gh-83273), so these regular expressions no longer exist there and the sample from the issue is detected correctly now. For the maintenance branches this change is too risky: a quoted field may legitimately contain a line break, and forbidding that in the pattern loses the evidence for the real delimiter. On 4000 generated samples it changes the guess for 1.4% of them, and in all of those cases the new guess is worse — for example |
bpo-44677: Do not allow to parse line breaks between quotes in CSV sniffer regexes