mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +01:00
Tighten a regular expression in repository.create
Summary: See <https://github.com/facebook/phabricator/issues/433>. We were missing a "^" here. This should be moved over to transactions soon and then we can get rid of the duplication. :/ Test Plan: Tried to create a repository with callsign "9X", got a helpful error about "ALL UPPERCASE LETTERS". Reviewers: btrahan Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D7531
This commit is contained in:
parent
769e921e65
commit
1c73d6cd06
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ final class ConduitAPI_repository_create_Method
|
|||
$repository->setName($request->getValue('name'));
|
||||
|
||||
$callsign = $request->getValue('callsign');
|
||||
if (!preg_match('/[A-Z]+$/', $callsign)) {
|
||||
if (!preg_match('/^[A-Z]+$/', $callsign)) {
|
||||
throw new ConduitException('ERR-BAD-CALLSIGN');
|
||||
}
|
||||
$repository->setCallsign($callsign);
|
||||
|
|
Loading…
Reference in a new issue