Require canonical numbers in routes

Summary:
D03646 works, I don't want it to work.
Theoretically, it can cause us some troubles if we use this string in JS number context where 030 is 24.

Test Plan: D03646, D3646

Reviewers: epriestley, edward

Reviewed By: edward

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3646
This commit is contained in:
vrana
2012-10-05 16:06:16 -07:00
parent 26d62ee450
commit 22cb8f5d08
20 changed files with 62 additions and 57 deletions

View File

@@ -42,8 +42,8 @@ final class PhabricatorApplicationMacro extends PhabricatorApplication {
return array(
'/macro/' => array(
'' => 'PhabricatorMacroListController',
'edit/(?:(?P<id>\d+)/)?' => 'PhabricatorMacroEditController',
'delete/(?P<id>\d+)/' => 'PhabricatorMacroDeleteController',
'edit/(?:(?P<id>[1-9]\d*)/)?' => 'PhabricatorMacroEditController',
'delete/(?P<id>[1-9]\d*)/' => 'PhabricatorMacroDeleteController',
),
);
}