Edgewall Software
Modify

Opened 16 years ago

Last modified 7 months ago

#7617 new defect

Various ticket fields don't like leading or trailing /

Reported by: Remy Blank Owned by:
Priority: low Milestone: next-stable-1.6.x
Component: ticket system Version: 0.11.1
Severity: minor Keywords: milestone
Cc: Ryan J Ollos Branch:
Release Notes:
API Changes:
Internal Changes:

Description

As an example, create a milestone where the name either starts or ends with a /. It will be visible in the roadmap, but clicking on the link will lead to an error, saying that the milestone cannot be found. The same problem applies to other enumerated fields like components, priorities or versions, when edited in the admin module.

The problem is due to the roadmap module creating links to milestones using req.href.milestone(milestone_name), and href stripping leading and trailing slashes at this location. The same analysis applies to the admin module.

I'm not sure if the solution is to build the milestone and admin links differently, or to remove the automatic stripping in Href. Opinions welcome.

Attachments (0)

Change History (15)

comment:1 by Christian Boos, 16 years ago

Same issue for Wiki page names, one could eventually create (programatically) a WikiPageName ending with a '/', but we won't be able to access it through the web interface, because of the redirect.

The only difference is that the web interface prevent creating such Wiki pages, but allows it for Milestones. So I think we should keep the links as they are and add some safeguards (i.e. strip trailing '/') when creating the milestones.

comment:2 by Remy Blank, 16 years ago

There's another reason why trailing slashes are forbidden in wiki page names: the attachments module displays the list of attachments for a wiki page- (or any other resource) when the URL has a trailing slash, like /attachments/wiki/WikiStart/. AFAIK, this is the only location in Trac where a trailing / is significant.

I don't think it is necessary to strip the slashes in milestone and other enum values. I have tried an experimental patch where the links are constructed so that the / are not stripped, and this fixes the problem (and everything else continues working). But I may be missing something.

comment:3 by Remy Blank, 16 years ago

BTW, shouldn't resource names containing arbitrary characters be passed as query arguments, like /milestone?name=My%20milestone ? Or does this break some kind of hierarchy convention?

comment:4 by Remy Blank, 16 years ago

Closed #6303 as a duplicate.

comment:5 by Remy Blank, 15 years ago

Milestone: 0.11-retriage0.12

This is related to #8159.

comment:6 by Remy Blank, 15 years ago

Milestone: 0.120.12.1

Not absolutely necessary for 0.12.

comment:7 by Christian Boos, 13 years ago

See also discussion in #9463.

comment:8 by Jun Omae, 13 years ago

When a ticket field that the name contains /../ or /./, the milestone and admin link does not work (e.g. foo/../bar).

I think that we should add a validation to the admin page.

comment:9 by Ryan J Ollos, 10 years ago

Cc: Ryan J Ollos added

comment:10 by Ryan J Ollos, 9 years ago

Milestone: next-minor-0.12.xnext-stable-1.0.x

comment:11 by Ryan J Ollos, 9 years ago

Owner: Remy Blank removed

comment:12 by figaro, 8 years ago

See also #10480.

comment:13 by Ryan J Ollos, 7 years ago

Milestone: next-stable-1.0.xnext-stable-1.2.x

Moved ticket assigned to next-stable-1.0.x since maintenance of 1.0.x is coming to a close. Please move the ticket back if it's critical to fix on 1.0.x.

comment:14 by Ryan J Ollos, 4 years ago

Milestone: next-stable-1.2.xnext-stable-1.4.x

comment:15 by Ryan J Ollos, 7 months ago

Milestone: next-stable-1.4.xnext-stable-1.6.x

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


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