Details
Description
When the server requests a local file, the connector validates that the client actually issued a matching LOAD DATA/XML LOCAL INFILE statement before sending any file. That validation regex only skipped /* … */ block comments preceding the statement.
As a result, a valid LOAD … LOCAL INFILE preceded by SQL line comments (-- … or # …) failed validation and the upload was wrongly rejected.
The regex now also skips – and # line comments. The comment marker is matched as the literal – (previously written as the single-character class [-]).
Reported by sebdomdev (Sebastian Dombrowski).