Brackets in company-id results in SQL Error

Moderator: crythias

Locked
thomasv
Znuny newbie
Posts: 1
Joined: 12 Jun 2012, 10:08
Znuny Version: 3.0.10

Brackets in company-id results in SQL Error

Post by thomasv »

Using OTRS 3.0.10.

The following results in an SQL error when opening a ticket:
  • Create a company with a bracket in the ID '(' and/or ')'
    Create a customer linked to this company
    Create a ticket for this customer
    When opening this ticket, an error is placed in the log
Example company-id: 'CustomerName (CustomerAlias)'

Example error:

Code: Select all

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '((st.customer_id = 'CustomerAlias') ))) LIMIT 10000' at line 1, SQL: 'SELECT COUNT(DISTINCT(st.id)) FROM ticket st, queue sq WHERE sq.id = st.queue_id AND st.ticket_state_id IN ( 1, 4, 6, 7, 8 ) AND sq.group_id IN (1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 15, 15, 16, 16, 17, 17) AND (((st.customer_id = 'CustomerName') ((st.customer_id = 'CustomerAlias') ))) LIMIT 10000'
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Brackets in company-id results in SQL Error

Post by jojo »

please open a BUG on this
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Locked