1
0
Fork 0
mirror of https://github.com/KingDuckZ/kamokan.git synced 2025-10-14 15:20:36 +00:00

Reject pastie tokens that are not in the a-z range.

This commit is contained in:
King_DuckZ 2017-06-08 10:15:22 +01:00
commit 5b88afb276
4 changed files with 34 additions and 5 deletions

View file

@ -52,7 +52,8 @@ namespace tawashi {
"Request is missing a POST variable.",
"Pastie not found.",
"Invalid CONTENT_TYPE.",
"Unsupported CONTENT_TYPE."
"Unsupported CONTENT_TYPE.",
"Invalid pastie token."
};
constexpr const auto lengths = string_lengths(err_descs);
static_assert(err_descs.static_size == lengths.static_size, "Mismatching array sizes between strings and their lengths");