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

Regex change for domainName field #113

Merged
merged 2 commits into from
Jan 24, 2024
Merged

Conversation

saikiranakula-amzn
Copy link
Collaborator

@saikiranakula-amzn saikiranakula-amzn commented Jan 23, 2024

Description of changes:
Regex validation check if the domainName is up to DNS naming standards
Testing:
int main() {
std::cout << "test regex" << "\n";

//std::cout << "a.com" << "\n";
std::cout << isValidDomain("a.com") << "\n";
//std::cout << isValidDomain("ab.com") << "\n";
std::cout << isValidDomain("ab.toto-abc.com") << "\n"; 
std::cout << isValidDomain("p/") << "\n";
std::cout << isValidDomain("test4.gmsa-pentest.com") << "\n";
std::cout << isValidDomain("-geeksforgeeks.org") << "\n";
std::cout << isValidDomain("contoso.com") << "\n";
std::cout << isValidDomain(".org") << "\n";

return 0;

}
~
"regex.cpp" 49L, 1331B written
[ec2-user@EC2AMAZ-Ll40tS ~]$ g++ -o test regex.cpp
[ec2-user@EC2AMAZ-Ll40tS ~]$ ./test
test regex
test1
test1
fail0
test1
fail0
test1
fail0

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@saikiranakula-amzn saikiranakula-amzn force-pushed the add_regex_domain branch 2 times, most recently from 1870e36 to 2a5a4d6 Compare January 23, 2024 18:28
Copy link
Contributor

@jamolina jamolina left a comment

Choose a reason for hiding this comment

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

Approved

@saikiranakula-amzn saikiranakula-amzn merged commit 67a97e4 into mainline Jan 24, 2024
1 check passed
@as14692 as14692 deleted the add_regex_domain branch October 15, 2024 22:45
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.

3 participants