← Back to team overview

mahara-contributors team mailing list archive

[Bug 1514273] [NEW] Increase to "longtext" all text columns that hold serialized user data

 

Public bug reported:

We've now had two bugs caused by serialized user data going into a text
database column, and being truncated to 65KB by MySQL:

Bug 1474659: import_entry_requests.entrycontent
Bug 1513851: activity_queue.data

We should try to get ahead of this issue by similarly increasing the
size of any other columns in the database that typically store
serialized user data. For instance, block_instance.configdata. If you
created a text block that contains exactly 65KB of text, it would
probably cause this same error, because, when serialized, it would tip
to just over 65KB.

I can't recall other serialized data columns off the top of my head, but
I imagine there's a few.

Additionally, if we have any other columns that store structured data
with user content inside of it, we should expand those as well. (Are we
storing any JSON-encoded values into the DB yet?). HTML is kind of an
exception, because, while it will break if it's truncated, it won't
generally cause a fatal error if we have broken HTML in the DB. Instead,
htmlpurifier will filter it out when it gets displayed.

** Affects: mahara
     Importance: Medium
         Status: Confirmed


** Tags: mysql

** Changed in: mahara
   Importance: Undecided => Medium

** Changed in: mahara
    Milestone: None => 16.04.0

** Changed in: mahara
       Status: New => Confirmed

** Tags added: mysql

** Description changed:

- We've now had two bugs caused by serialized user data go into a database
- column, and being truncated to 65KB by MySQL:
+ We've now had two bugs caused by serialized user data going into a text
+ database column, and being truncated to 65KB by MySQL:
  
  Bug 1474659: import_entry_requests.entrycontent
  Bug 1513851: activity_queue.data
  
  We should try to get ahead of this issue by similarly increasing the
  size of any other columns in the database that typically store
  serialized user data. For instance, block_instance.configdata. If you
  created a text block that contains exactly 65KB of text, it would
  probably cause this same error, because, when serialized, it would tip
  to just over 65KB.
  
  I can't recall other serialized data columns off the top of my head, but
  I imagine there's a few.
  
  Additionally, if we have any other columns that store structured data
  with user content inside of it, we should expand those as well. (Are we
  storing any JSON-encoded values into the DB yet?). HTML is kind of an
  exception, because, while it will break if it's truncated, it won't
  generally cause a fatal error if we have broken HTML in the DB. Instead,
  htmlpurifier will filter it out when it gets displayed.

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1514273

Title:
  Increase to "longtext" all text columns that hold serialized user data

Status in Mahara:
  Confirmed

Bug description:
  We've now had two bugs caused by serialized user data going into a
  text database column, and being truncated to 65KB by MySQL:

  Bug 1474659: import_entry_requests.entrycontent
  Bug 1513851: activity_queue.data

  We should try to get ahead of this issue by similarly increasing the
  size of any other columns in the database that typically store
  serialized user data. For instance, block_instance.configdata. If you
  created a text block that contains exactly 65KB of text, it would
  probably cause this same error, because, when serialized, it would tip
  to just over 65KB.

  I can't recall other serialized data columns off the top of my head,
  but I imagine there's a few.

  Additionally, if we have any other columns that store structured data
  with user content inside of it, we should expand those as well. (Are
  we storing any JSON-encoded values into the DB yet?). HTML is kind of
  an exception, because, while it will break if it's truncated, it won't
  generally cause a fatal error if we have broken HTML in the DB.
  Instead, htmlpurifier will filter it out when it gets displayed.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1514273/+subscriptions


Follow ups