Closed Bug 615722 Opened 14 years ago Closed 11 years ago

Error creating articles with slug prefix '%2A' (asterisk)

Categories

(support.mozilla.org :: Knowledge Base Software, task, P4)

Tracking

(Not tracked)

RESOLVED FIXED
2013Q3

People

(Reporter: rbillings, Assigned: shuhao)

Details

(Whiteboard: u=contributor c=wiki p=0 s=2013.13)

Articles with slug title prefix '%2A' generate a 'page not found' error.

1) /kb/new
2) title= %2Ahello
3) edit slug = %2Ahello
4) add summary, content> submit article

expected: kb article created
actual: page not found error
Reproduced.
Summary: Error creating articles with slug prefix '%2A' → Error creating articles with slug prefix '%2A' (asterisk)
Priority: -- → P4
Whiteboard: u=contributor c=wiki p= s=2013.backlog
Reproduced, I'll take this.

However, there are a couple of options:

  - Do we want to save the article as "*hello". That's a one line patch. However, it creates confusion as we have "%2AHello" as the title instead of "*Hello" as the title.
  - Do we want to throw an error saying this is not allowed. It seems like a weird case anyway.
Assignee: nobody → shwu
Flags: needinfo?
OS: Mac OS X → All
Hardware: x86 → All
Whiteboard: u=contributor c=wiki p= s=2013.backlog → u=contributor c=wiki p=1 s=2013.backlog
Currently I fixed it via the first method. Please notify me if we desire different behaviour (the second method is harder to code and more error prone)

PR: https://github.com/mozilla/kitsune/pull/1474
Status: NEW → ASSIGNED
Actually, option one is not available. That allows anyone to create a slug with spaces, ?, /, and other bad characters. So I'll throw an error when this happens.
Flags: needinfo?
Moving to current sprint since it is in a PR :)
Whiteboard: u=contributor c=wiki p=1 s=2013.backlog → u=contributor c=wiki p=1 s=2013.13
Target Milestone: Future → 2013Q3
Landed in https://github.com/mozilla/kitsune/commit/e982e27da9496290730c0346e6e689ac7727a77e

Just gotta deploy it now!
Whiteboard: u=contributor c=wiki p=1 s=2013.13 → u=contributor c=wiki p=0 s=2013.13
Deployed to prod now.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.