• unknown's avatar
    Fix for Bug#29605 · 233143fd
    unknown authored
    --local-infile=0 checks can be bypassed by sending a FETCH LOCAL FILE response
      
    Add a check for CLIENT_LOCAL_FILES before sending a local file.
    Beware, that all binary distributions enable sending of local files and it's up
    to the programs which use libmysql to disable it, if they don't use this functionality.
    Otherwise they are not safe.
    
    
    client/mysqltest.c:
      Enable LOAD DATA LOCAL INFILE for the test suite, like some rpl and ndb test.
    sql-common/client.c:
      Check if the client has LOAD DATA LOCAL INFILE disabled and
      don't serve such requests from the server. This is not 100% proof,
      as if the client has this enabled, in all binary builds for BC,
      the check won't work and the client can be tricked into sending a
      local file.
    tests/mysql_client_test.c:
      Switch on LOCAL INFILE in client test. If one day there
      is a test which uses it, then it will work out of the box.
    233143fd
mysql_client_test.c 475 KB