Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Oct 2008
    Location
    Croatia
    Posts
    1,202
    Plugin Contributions
    12

    Default admin_activity_log data too long

    Symptom spotted on ZC 1.5.5 (no suffix) and reproduced on 1.5.6c

    Adding/editing category description with a dozen YouTube embedded videos. Blank page on save. Error log as follows:
    Code:
    [17-Jan-2020 10:29:06 Australia/Melbourne] Request URI: /ADMIN/categories.php?action=update_category&cPath=23_26, IP address: XXX.XXX.XXX.134
    #1  trigger_error() called at [/home/ACCOUNT/public_html/includes/classes/db/mysql/query_factory.php:167]
    #2  queryFactory->show_error() called at [/home/ACCOUNT/public_html/includes/classes/db/mysql/query_factory.php:139]
    #3  queryFactory->set_error() called at [/home/ACCOUNT/public_html/includes/classes/db/mysql/query_factory.php:266]
    #4  queryFactory->Execute() called at [/home/ACCOUNT/public_html/ADMIN/includes/functions/database.php:53]
    #5  zen_db_perform() called at [/home/ACCOUNT/public_html/ADMIN/includes/classes/class.admin.zcObserverLogWriterDatabase.php:45]
    #6  zcObserverLogWriterDatabase->updateNotifyAdminFireLogWriters() called at [/home/ACCOUNT/public_html/includes/classes/class.base.php:103]
    #7  base->notify() called at [/home/ACCOUNT/public_html/ADMIN/includes/classes/class.admin.zcObserverLogEventListener.php:59]
    #8  zcObserverLogEventListener->updateNotifyAdminActivityLogEvent() called at [/home/ACCOUNT/public_html/includes/classes/class.base.php:103]
    #9  base->notify() called at [/home/ACCOUNT/public_html/ADMIN/includes/init_includes/init_admin_history.php:13]
    #10 require(/home/ACCOUNT/public_html/ADMIN/includes/init_includes/init_admin_history.php) called at [/home/ACCOUNT/public_html/includes/autoload_func.php:48]
    #11 require(/home/ACCOUNT/public_html/includes/autoload_func.php) called at [/home/ACCOUNT/public_html/ADMIN/includes/application_top.php:171]
    #12 require(/home/ACCOUNT/public_html/ADMIN/includes/application_top.php) called at [/home/ACCOUNT/public_html/ADMIN/categories.php:9]
    
    [17-Jan-2020 10:29:06 Australia/Melbourne] PHP Fatal error:  1406:Data too long for column 'attention' at row 1 :: insert into admin_activity_log (access_date, admin_id, page_accessed, page_parameters, ip_address, gzpost, flagged, attention, severity, logmessage) values (now(), '1', 'categories.php', 'action=update_category&cPath=23_26', 'XXX.XXX.XXX.134', '͗N0_%^miJA-=RhHL]!*wǥb\\e\'3~2yr12@##C\ZVg-AuTL6##0CZ;4/I1h4T$tl)\'f([##H]A9˲HM\Z<( ʞ\\vػG\n2|$TX*1R,@rWN##$W\"Շ^QE;tK_ޟGZ##Ld,@Wip#8N0kRQzvڴC7.މ\Zvwb##;.]SP##5W5{4ѴCg](jj^<dOq۟\rNQjdhp j!\r%1E*-nM~]΢n_uaǝ>mI\'v[Dbr7;</b\\x(##:c08j/>@\'SN6Zb`WCJh,$4IIhRz_uAYwPl-wISetKO9\"r##\"SV25+XA6bf!/y', '1', 'ALERT: Please review for possible XSS activity: [&lt;iframe and &lt;iframe and &lt;iframe and &lt;iframe and &lt;iframe and &lt;iframe and &lt;iframe and &lt;iframe and &lt;iframe and &lt;iframe and &lt;iframe and &lt;iframe and &lt;iframe and &lt;iframe and &lt;iframe and &lt;iframe]', 'notice', 'Accessed page [categories.php] with action=update_category. Review page_parameters and postdata for details.') ==> (as called by) /home/ACCOUNT/public_html/ADMIN/includes/functions/database.php on line 53 <== in /home/ACCOUNT/public_html/includes/classes/db/mysql/query_factory.php on line 167
    This might be related to CSF installed on server, and/or OWASP mod_security with very strict rules in use (almost paranoia mode), but still...

    Is there any specific reason why the 'attention' column isn't TEXT instead of varchar(255) - are there any downsides or possible problems that might occur after changing it to TEXT ? I mean, I've already done it, but just wondering if I should expect headaches...
    Code:
    ALTER TABLE `admin_activity_log` CHANGE `attention` `attention` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL;
    Zen Cart Point of Sale? Sure: ZX POS - v2 released
    My site - Pro ZC Help | My portfolio | My plugins

  2. #2
    Join Date
    Jan 2004
    Posts
    65,350
    Blog Entries
    7
    Plugin Contributions
    230

    Default Re: admin_activity_log data too long

    Yes it's probably time to "store more" :)

    v157 will change it like this:
    ALTER TABLE admin_activity_log MODIFY attention MEDIUMTEXT;
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. 1406 Data too long for column 'ip_address' at row 1 error
    By OopsIbrickedIT in forum Installing on a Linux/Unix Server
    Replies: 7
    Last Post: 21 Oct 2019, 09:19 PM
  2. Replies: 3
    Last Post: 26 Mar 2018, 07:08 AM
  3. Data too long for column
    By yd29999 in forum General Questions
    Replies: 0
    Last Post: 8 Sep 2017, 06:45 PM
  4. Direct Bank Deposit - 1406 Data too long for column 'shipping_method'
    By remoteone in forum Addon Payment Modules
    Replies: 13
    Last Post: 31 Mar 2009, 12:24 AM
  5. Data too long for column 'shipping_method' - Big Royal Mail
    By pwhyles in forum Addon Shipping Modules
    Replies: 3
    Last Post: 9 Nov 2006, 08:49 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR