fix(editor): Update git repo URL validation to prevent using https protocol (#6475)

This commit is contained in:
Csaba Tuncsik 2023-06-19 12:17:45 +02:00 committed by GitHub
parent d9f646511a
commit 8b50625fb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -117,7 +117,7 @@ const repoUrlValidationRules: Array<Rule | RuleGroup> = [
{
name: 'MATCH_REGEX',
config: {
regex: /(?:git|ssh|https?|git@[-\w.]+):(\/\/)?(.*?)(\.git)(\/?|\#[-\d\w._]+?)$/,
regex: /^(?!https?:\/\/)(?:git|ssh|git@[-\w.]+):(\/\/)?(.*?)(\.git)(\/?|\#[-\d\w._]+?)$/,
message: locale.baseText('settings.versionControl.repoUrlInvalid'),
},
},