From 2fc73b17a1aaf853d3cae11a75aeb89fb7a1d532 Mon Sep 17 00:00:00 2001 From: "Chris A. Taylor" Date: Tue, 12 Feb 2013 14:09:54 -0800 Subject: [PATCH] Regex to test for valid shortNames --- build/native/native-ios.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/native/native-ios.js b/build/native/native-ios.js index 9ac855e5..4190fd73 100644 --- a/build/native/native-ios.js +++ b/build/native/native-ios.js @@ -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) {