mysql2
mysql2 copied to clipboard
MySQL2 LOCAL INFILE should be disabled by default.
MySQL LOCAL INFILE has been leveraged to perform file exfiltration in the past.
Official documentation advise to disable this capability unless it is explicitly enabled.
To avoid LOAD DATA issues, clients should avoid using LOCAL unless proper client-side precautions have been taken.
May you consider disabling LOCAL INFILE
by default in future mysql2
releases?
Following the affected code that in null-y case will default to 1
(enabled)
case MYSQL_OPT_LOCAL_INFILE:
intval = (value == Qfalse ? 0 : 1);
retval = &intval;
break;
Seems reasonable. I'll target this for the next major since it would be a breaking change to current users.