Compare commits

..

1 commit

Author SHA1 Message Date
aea29c581b chore(deps): lock file maintenance
Some checks are pending
renovate/stability-days Updates have not met minimum release age requirement
2026-06-11 09:20:57 +00:00
3 changed files with 3 additions and 9 deletions

View file

@ -4,7 +4,6 @@ import requests
KLDSCP_SUPPORTED_ORIGINS = [
"amnezia.org",
"belsat.eu",
"doxa.team",
"holod.media",
"memorialcenter.org",
@ -13,9 +12,6 @@ KLDSCP_SUPPORTED_ORIGINS = [
"semnasem.org",
"theins.ru",
"thenewtab.io",
"thenewtab.support",
"vot-tak.tv",
"vpnpay.io",
"zaodno.org",
]

View file

@ -64,18 +64,16 @@ def fetch_url(base: str, url: str) -> str | None:
content_length = response.headers.get("Content-Length")
if content_length is not None:
try:
if int(content_length) > 2_500_000:
if int(content_length) > 500_000:
return None
except ValueError:
pass # Invalid Content-Length format, proceed to stream
content = b""
for chunk in response.iter_content(chunk_size=1024):
content += chunk
if len(content) > 2_500_000:
if len(content) > 500_000:
return None
content_type = response.headers.get("Content-Type", "")
if content_type == "":
return None
return encode_data_uri(content, content_type)
except requests.exceptions.RequestException:
return None

View file

@ -88,7 +88,7 @@
</div>
</summary>
<div class="snap-trust-header__content">
{{ gettext('This story is a copy of an article from <a href="{site_url}" class="snap-trust-header__sitelink">{site_title}</a>. It is delivered to you from a trusted archive to assure its availability over time.').format(site_url=site_url, site_title=site_title) | safe }} <p>
{{ gettext('This story is a copy of an article from <a href="{site_url}" class="snap-trust-header__sitelink">{site_title}</a>. It is delivered to you from a trusted archive to assure its availability over time.').format(site_url=site_url, site_title=site_title) }} <p>
<a href="{{ article_url }}" class="snap-footer-link">
{{ gettext("View the article source") }}
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">