Piwigo Bugtracker

Piwigo bug tracker has moved to Github

This bugtracker is kept to provide history on old issues.


View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003176Piwigodatabasepublic2014.11.16 06:582014.11.16 07:08
Reporterpalleroy0 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS X/DarwinOS Version10.9/13.4
Product Version2.7.1 
Target VersionFixed in Version 
Summary0003176: Image download through "Download this file" corrupted due to "<pre></pre>" at beginning of jpeg
DescriptionWhen using the "Download this file" link while viewing a picture, every jpeg file was being corrupted. The beginning of the jpeg file contained the text "
" causing the corruption.  I was able to track this to the file functions_mysqli.inc.php line 829-831 and functions_mysql.inc.php lines 758-760.  In my specific circumstance, I use IPv6.  When accessing my site through IPv6, I recieve this error "PHP Warning:  [mysql error 1406] Data too long for column 'IP' at row 1\n\nINSERT INTO piwigo_history\n  (\n    date,       \n    time,\n    user_id,\n    IP,\n    section,\n    category_id,\n    image_id,\n    image_type,\n    tag_ids\n  )\n  VALUES\n  (\n    CURRENT_DATE,\n    CURRENT_TIME,\n    2,\n    '***Removed IPv6 address***',\n    NULL,\n    NULL,\n    3077,\n    'high',\n    NULL\n  )\n; in /piwigo/include/dblayer/functions_mysqli.inc.php on line 830"

This error was causing the previously mentioned lines of code to print the tags "
".  When using the download link, the tags are being printed to the beginning of the jpeg file causing corruption of the jpeg.
Steps To ReproduceHave an mysql error when the "Download this file" link is used. In my case, the mysql error was the fact that an IPv6 address is too long for the IP field in piwigo_history in the mysql database. The lines of code in functions_mysqli.inc.php line 829-831 and functions_mysql.inc.php lines 758-760 print the tags "
" to the beginning of the jpeg file.
TagsNo tags attached.
browserany
Database engine and versionmysql 5.6.15
PHP version5.5.17
Web serverApache 2.2
Attached Files

- Relationships

-  Notes
(0007714)
palleroy0 (reporter)
2014.11.16 07:07

Instances of the text
 disappeared from the report.	
(0007715)
palleroy0 (reporter)
2014.11.16 07:08

Instances of the text < pre > < / pre > disappeared form the report.

- Issue History
Date Modified Username Field Change
2014.11.16 06:58 palleroy0 New Issue
2014.11.16 06:58 palleroy0 browser => any
2014.11.16 06:58 palleroy0 Database engine and version => mysql 5.6.15
2014.11.16 06:58 palleroy0 PHP version => 5.5.17
2014.11.16 06:58 palleroy0 Web server => Apache 2.2
2014.11.16 07:07 palleroy0 Note Added: 0007714
2014.11.16 07:08 palleroy0 Note Added: 0007715


Copyright © 2000 - 2018 MantisBT Team
Contact
Powered by Mantis Bugtracker