Skip to content

Commit

Permalink
Merge pull request play-co#11 from gameclosure/shortname-regex
Browse files Browse the repository at this point in the history
Regex to test for valid shortNames
  • Loading branch information
ArnoVanDerVegt committed Feb 14, 2013
2 parents 16894a2 + 2fc73b1 commit ef12890
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build/native/native-ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,11 @@ exports.package = function (builder, project, opts, next) {
throw new Error("Build aborted: No appID or shortName in the manifest.");
}

// If shortName is invalid,
if (!/^[a-zA-Z0-9.-]+$/.test(shortName)) {
throw new Error("Build aborted: shortName contains invalid characters. Should be a-Z 0-9 . - only");
}

// If IPA mode,
var developer, provision;
if (argv.ipa) {
Expand Down

0 comments on commit ef12890

Please sign in to comment.