Subsonic API: limit size parameter to 500 for various methods

This commit is contained in:
emeric
2023-11-08 22:47:41 +01:00
parent 121d27b5cd
commit b89dfba089
3 changed files with 30 additions and 7 deletions
@@ -185,6 +185,18 @@ namespace API::Subsonic
const std::string _parameterName;
};
class ParameterValueTooHighGenericError : public GenericError
{
public:
ParameterValueTooHighGenericError(std::string_view parameterName, std::size_t max) : _parameterName{ parameterName }, _max{ max } {}
private:
std::string getMessage() const override { return "Parameter '" + _parameterName + "': bad value"; }
const std::string _parameterName;
std::size_t _max;
};
class Response
{
public: