We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
OCPP1.6
Harden message_callback against runtime error, if the message form the backend can not be handled. See #884
This catches set runttime_error inside ocpp/common/string.hpp void set(const std::string& data) { if (data.length() <= this->length) { if (this->is_valid(data)) { this->data = data; } else { throw std::runtime_error("String has invalid format"); } } else { throw std::runtime_error("String length (" + std::to_string(data.length()) + ") exceeds permitted length (" + std::to_string(this->length) + ")"); } }
option would be, instead of runtime_error, cut the string.
E.g. Authorize.conf with partendId longer then 20 characters.
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
OCPP Version
OCPP1.6
Describe the bug
Harden message_callback against runtime error, if the message form the backend can not be handled.
See #884
This catches set runttime_error inside ocpp/common/string.hpp
void set(const std::string& data) {
if (data.length() <= this->length) {
if (this->is_valid(data)) {
this->data = data;
} else {
throw std::runtime_error("String has invalid format");
}
} else {
throw std::runtime_error("String length (" + std::to_string(data.length()) +
") exceeds permitted length (" + std::to_string(this->length) + ")");
}
}
option would be, instead of runtime_error, cut the string.
E.g. Authorize.conf with partendId longer then 20 characters.
To Reproduce
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: