Edgewall Software
Modify

Opened 15 years ago

Closed 15 years ago

#8943 closed defect (fixed)

[PATCH] Double spaces in HTML Drop-down list

Reported by: davide.vernizzi@… Owned by: Remy Blank
Priority: low Milestone: 0.12
Component: general Version: 0.11-stable
Severity: minor Keywords: drop-down list
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Authenticating to Trac using TLS client authentication may lead to incorrect visualization when the ticket Assign-to is rendered by a HTML drop-down list.

At work we use X.509 certificates and we have double spaced Common Names, but HTML does not render the double spaces to separate given names (e.g. John Steve) from family name (e.g. Doe).

The simple solution is to use the "value" attribute of the HTML "option" tag.

I'll give an example. Our certificates are in the form:

/C=IT/O=My Org/CN=John Steve  Doe

note the double space between John Steve and Doe.

The HTML code of the page for creating a new ticket is:

<td class="col1">
  <select id="field-owner" name="field_owner">
    <option></option>
    <option>/C=IT/O=My Org/CN=John Steve  Doe</option>
  </select>
</td>

but the rendered entry in the drop-down list is

/C=IT/O=My Org/CN=John Steve  Doe

note the single space between John Steve and Doe.

The correct HTML should be:

<td class="col1">
  <select id="field-owner" name="field_owner">
    <option></option>
    <option value="/C=IT/O=My Org/CN=John Steve  Doe">/C=IT/O=My Org/CN=John Steve  Doe</option>
  </select>
</td>

We provide a patch that solves such problem in tickets/templates/ticket.html , but we do not know if the same problem arises elsewhere.

Attachments (1)

ticket_template_drop-down-list.patch (1.1 KB ) - added by davide.vernizzi@… 15 years ago.
Patch provided

Download all attachments as: .zip

Change History (6)

by davide.vernizzi@…, 15 years ago

Patch provided

comment:1 by Remy Blank, 15 years ago

Is this only a display issue, or do tickets get assigned to a wrong (non-existing) user if you re-assign?

comment:2 by davide.vernizzi@…, 15 years ago

It is not only a display issue: the assigned user does not receive any notification email. I'm not sure about the task assignment; I suspect it does not work either (why should it assign task, but not send the email?), but I can not test right now. I will provide further information as soon as possible.

comment:3 by Remy Blank, 15 years ago

Milestone: 0.11.70.12
Owner: set to Remy Blank

Ok, I'll look into this.

comment:4 by Remy Blank, 15 years ago

This is browser-dependent. Firefox, Opera and IE8 have this issue, while Chorme doesn't.

comment:5 by Remy Blank, 15 years ago

Resolution: fixed
Status: newclosed

There were indeed many more locations where the same issue could occur. Fixed in [9042].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.