SECURITY: Prevent Onebox cache overflow by limiting downloads and URL lengths

This commit is contained in:
Ted Johansson
2023-10-18 10:29:36 +08:00
committed by Krzysztof Kotlarek
parent 3c5fb871c0
commit 95a82d608d
5 changed files with 42 additions and 8 deletions

View File

@@ -1,7 +1,7 @@
# frozen_string_literal: true
class UrlHelper
MAX_URL_LENGTH = 100_000
MAX_URL_LENGTH = 2_000
# At the moment this handles invalid URLs that browser address bar accepts
# where second # is not encoded