#199 Files uploaded into BLOB columns are truncated

3.3.3
closed-works-for-me
SQLite (26)
5
2014-08-16
2011-10-03
Anonymous
No

When uploading a file into any BLOB column in SQLite3 the file is truncated at first NUL byte. This makes image uploads unusable.

Problem is in SQLite escaping function $connection->quote($string) - SQLite truncates the string at first NUL byte.

Solution is to modify quote function to check for NUL byte and convert string to its hex representation using X'...' literal and pack('H*',$data) function.

Discussion

  • Jakub Vrána

    Jakub Vrána - 2012-06-30

    I couldn't reproduce it. Which extension do you use? You can find it on server overview at ?sqlite=&username=.

     
  • Jakub Vrána

    Jakub Vrána - 2012-06-30
    • status: open --> pending-works-for-me
     
  • Jakub Vrána

    Jakub Vrána - 2014-02-24
    • status: pending-works-for-me --> closed-works-for-me
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks