Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-11526

Error in integer validation in publish

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 3.10.1, 3.9.5, 4.0.0alpha2
    • 3.10.0, 3.9.4, 4.0.0alpha1
    • None
    • Operating System: Linux (Debian Etch) 2.6.18 (OpenVz patched kernel)
      PHP Version: 4.4.4
      Database and version: MySQL 5.0.32
      Browser (and version): Mozilla Firefox 2.0

    Description

      Strange exceptions thrown if integer field contains spaces:

      Got the following in error.log:

      [ Oct 01 2007 17:08:59 ] [192.168.1.66] eZDBInterface::commit TRANSID-94bba195ae7da17f826adfd3b71a4f54:
      Transaction in progress failed due to DB error, transaction was rollbacked. Transaction ID is TRANSID-94bba195ae7da17f826adfd3b71a4f54.
      [ Oct 01 2007 17:09:15 ] [192.168.1.66] eZPostgreSQLDB:
      Error: error executing query: UPDATE ezcontentobject_attribute
      SET language_id='2', contentclassattribute_id='356',
      attribute_original_id='0', sort_key_int='301230 ', sort_key_string='',
      data_type_string='ezinteger', data_text='', data_int='301230 ', data_float='0.000000'
      WHERE id='1616' AND contentobject_id='258' AND version='1' AND language_code='nor-NO' ERROR: invalid input syntax for integer: "301230 "
      [ Oct 01 2007 17:09:15 ] [192.168.1.66] eZDBInterface::commit TRANSID-e9e579af834fc7175ab174a68bc9ea27:
      Transaction in progress failed due to DB error, transaction was rollbacked. Transaction ID is TRANSID-e9e579af834fc7175ab174a68bc9ea27.

      The solution to this problem would probably be to strip all spaces from integer fields before validating.

      Steps to reproduce

      Try to create ezobject with an integer field, and type in a space somewhere in the integer e.g '1234 56 78'

      Attachments

        Activity

          People

            dp dp
            kingjonas kingjonas
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: