- if (!regex_match(user, regex_user)) {
- std::cerr << "Invalid username " << user << "." << std::endl;
+ if (!regex_match(domain, regex_domain)) {
+ std::cerr << "Invalid domain " << domain << "." << std::endl;
+ exit(1);
+ }
+ if (!regex_match(password, regex_password)) {
+ std::cerr << "Invalid password " << password << "." << std::endl;