Error 500 when viewing some group milestones - 8.3.1 or later
Summary
A 500 error occurs when viewing group milestones which have a milestone named only with non-alphanumeric characters.
Steps to reproduce
- Create a milestone titled with only punctuation characters (e.g.,
(^-^)
) in project on group namespace. e.g., %(^-^) in tnir-pick-mr-test/tnir-gitlab-test-general - Access to milestones for the group to get a 500 error. e.g., https://gitlab.com/groups/tnir-pick-mr-test/milestones
Output of checks
This bug happens on GitLab.com and self-hosting with GL 8.3.1 through current (9.3.4 as of 2017-07-06).
Possible fixes
-
normalize
should be replaced with another method inGlobalMilestone#safe_title
. https://gitlab.com/gitlab-org/gitlab-ce/blob/v9.3.4/app/models/global_milestone.rb#L64 - Or, as
:id
is meaningless on globalmilestone, remove:id
from the URL to behttps://gitlab.com/groups/gitlab-org/milestones/dummy?title=9.5
instead ofhttps://gitlab.com/groups/gitlab-org/milestones/95?title=9.5
cf.
!2182 (merged) (#4226 (closed))
/label
~bug milestones
Edited by Takuya Noguchi