[Koha-bugs] [Bug 19326] New: Report editor in guided_reports.pl truncates reports longer than 64 KiB

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Sep 15 17:32:11 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19326

            Bug ID: 19326
           Summary: Report editor in guided_reports.pl truncates reports
                    longer than 64 KiB
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Reports
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: barton at bywatersolutions.com
        QA Contact: testopia at bugs.koha-community.org

Created attachment 67151
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=67151&action=edit
A query longer than 65535; this will be truncated when saved.

The field saved_sql.savedsql is type 'text', which is 65535 characters long.

mysql> select table_name, column_name, data_type from
information_schema.columns where column_name = 'savedsql';
+------------+-------------+-----------+
| table_name | column_name | data_type |
+------------+-------------+-----------+
| saved_sql  | savedsql    | text      |
+------------+-------------+-----------+

The query editor in  guided_reports.pl does not check the size of the report
being saved, causing the report to be truncated if its more than 65535
characters long.

I would suggest changing the data type of savedsql to LONGTEXT, then limiting
the query length to something fairly large, but less than 4,294,967,295
characters, with a warning (to avoid denial of service by filling the hard
drive).

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list