Skip to content
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

Fix TODO: Add validation for email, ip and uris #298

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

inteon
Copy link
Contributor

@inteon inteon commented Jul 5, 2023

This PR fixes a TODO in the VCert code.

@@ -280,17 +284,18 @@ func (p *Policy) ValidateCertificateRequest(request *certificate.Request) error
return fmt.Errorf(organizationUnitError, parsedCSR.Subject.OrganizationalUnit, p.SubjectOURegexes)
}

if !isComponentValid(parsedCSR.Subject.Country, p.SubjectCRegexes, false) {
return fmt.Errorf(countryError, parsedCSR.Subject.Country, p.SubjectCRegexes)
if !isComponentValid(parsedCSR.Subject.Province, p.SubjectSTRegexes, false) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the order, so it matches the ordering that is used below. This should not have any noteworthy effects on the behavior of this function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant