-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert "Revert "[eas-json] validate EAS Submit inputs better"" #2202
Revert "Revert "[eas-json] validate EAS Submit inputs better"" #2202
Conversation
Size Change: +4.7 kB (0%) Total Size: 51.5 MB
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2202 +/- ##
==========================================
+ Coverage 54.14% 54.16% +0.03%
==========================================
Files 516 516
Lines 18798 18808 +10
Branches 3769 3772 +3
==========================================
+ Hits 10176 10186 +10
Misses 8601 8601
Partials 21 21 ☔ View full report in Codecov by Sentry. |
/changelog-entry chore Add better validation for EAS Submit inputs |
Co-authored-by: Stanisław Chmiela <[email protected]>
@@ -111,6 +111,11 @@ export default class IosSubmitCommand { | |||
const envAppSpecificPassword = getenv.string('EXPO_APPLE_APP_SPECIFIC_PASSWORD', ''); | |||
|
|||
if (envAppSpecificPassword) { | |||
if (!/^[a-z]{4}-[a-z]{4}-[a-z]{4}-[a-z]{4}$/.test(envAppSpecificPassword)) { | |||
throw new Error( | |||
'EXPO_APPLE_APP_SPECIFIC_PASSWORD must be in the format XXXX-XXXX-XXXX-XXXX, where X is a lowercase letter.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'EXPO_APPLE_APP_SPECIFIC_PASSWORD must be in the format XXXX-XXXX-XXXX-XXXX, where X is a lowercase letter.' | |
'EXPO_APPLE_APP_SPECIFIC_PASSWORD must be in the format xxxx-xxxx-xxxx-xxxx, where x is a lowercase letter.' |
appleTeamId: Joi.string() | ||
.regex(/^[\dA-Z]{10}$/) // Apple says that it always has to be 10 characters long https://developer.apple.com/help/account/manage-your-team/locate-your-team-id/ | ||
.message( | ||
'Invalid Apple Team ID was specified. It should consist of 10 uppercase letters or digits. Example: "AB32CDE81F".' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Invalid Apple Team ID was specified. It should consist of 10 uppercase letters or digits. Example: "AB32CDE81F".' | |
'Invalid Apple Team ID was specified. It should consist of 10 uppercase letters or digits. Example: "AB32CZE81F".' |
(so as not to confuse with hex, let's add some non-hex characters in the example)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 🚀
✅ Thank you for adding the changelog entry! |
Why
Apply changes from #2198 with fixes
How
Same as for #2198, but I made constraints for validating
ascApiKeyId
andascAppId
more loose and added some comments.Test plan
Tests