mirror of
https://gitlab.com/mangadex-pub/mangadex_at_home.git
synced 2024-01-19 02:48:37 +00:00
Log warning instead of stack trace if token is too short
This commit is contained in:
parent
bba979c212
commit
5d8fe5b272
|
@ -95,6 +95,10 @@ class ImageServer(
|
|||
|
||||
if (tokenized || serverSettings.forceTokens) {
|
||||
val tokenArr = Base64.getUrlDecoder().decode(Path.of("token")(request))
|
||||
if (tokenArr.size < 24) {
|
||||
LOGGER.info { "Request for $sanitizedUri rejected for invalid token" }
|
||||
return@then Response(Status.FORBIDDEN)
|
||||
}
|
||||
val token = try {
|
||||
JACKSON.readValue<Token>(
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue