Fix build

This commit is contained in:
Nikolay Degterinsky 2022-12-12 13:47:06 +00:00
parent 19e95e8cd8
commit e0defffcb4
2 changed files with 5 additions and 5 deletions

View File

@ -175,7 +175,7 @@ public:
}
}
void setPasswordComplexityRules(std::vector<std::pair<String, String>> rules_)
void setPasswordComplexityRules(const std::vector<std::pair<String, String>> & rules_)
{
Rules new_rules;
@ -187,7 +187,7 @@ public:
"Password complexity pattern {} cannot be compiled: {}",
original_pattern, matcher->error());
new_rules.push_back({std::move(matcher), std::move(original_pattern), std::move(exception_message)});
new_rules.push_back({std::move(matcher), original_pattern, exception_message});
}
std::lock_guard lock{mutex};
@ -643,9 +643,9 @@ void AccessControl::setPasswordComplexityRulesFromConfig(const Poco::Util::Abstr
password_rules->setPasswordComplexityRulesFromConfig(config_);
}
void AccessControl::setPasswordComplexityRules(std::vector<std::pair<String, String>> rules_)
void AccessControl::setPasswordComplexityRules(const std::vector<std::pair<String, String>> & rules_)
{
password_rules->setPasswordComplexityRules(std::move(rules_));
password_rules->setPasswordComplexityRules(rules_);
}
void AccessControl::checkPasswordComplexityRules(const String & password_) const

View File

@ -150,7 +150,7 @@ public:
/// Check complexity requirements for plaintext passwords
void setPasswordComplexityRulesFromConfig(const Poco::Util::AbstractConfiguration & config_);
void setPasswordComplexityRules(std::vector<std::pair<String, String>> rules_);
void setPasswordComplexityRules(const std::vector<std::pair<String, String>> & rules_);
void checkPasswordComplexityRules(const String & password_) const;
std::vector<std::pair<String, String>> getPasswordComplexityRules() const;