Files
changedetection.io/changedetectionio/blueprint/__init__.py
dgtlmoon f42da28dab
Build and push containers / metadata (push) Canceled after 0s
Build and push containers / build-push-containers (push) Canceled after 0s
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Build distribution 📦 (push) Canceled after 0s
ChangeDetection.io Container Build Test / Build linux/amd64 (alpine) (push) Canceled after 0s
ChangeDetection.io Container Build Test / Build linux/arm64 (alpine) (push) Canceled after 0s
ChangeDetection.io Container Build Test / Build linux/amd64 (main) (push) Canceled after 0s
ChangeDetection.io Container Build Test / Build linux/arm/v7 (main) (push) Canceled after 0s
ChangeDetection.io Container Build Test / Build linux/arm/v8 (main) (push) Canceled after 0s
ChangeDetection.io Container Build Test / Build linux/arm64 (main) (push) Canceled after 0s
ChangeDetection.io App Test / lint-code (push) Canceled after 0s
ChangeDetection.io App Test / lint-translations (push) Canceled after 0s
ChangeDetection.io App Test / lint-template-i18n (push) Canceled after 0s
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Test the built package works basically. (push) Canceled after 0s
Publish Python 🐍distribution 📦 to PyPI and TestPyPI / Publish Python 🐍 distribution 📦 to PyPI (push) Canceled after 0s
ChangeDetection.io App Test / test-application-3-10 (push) Canceled after 0s
ChangeDetection.io App Test / test-application-3-11 (push) Canceled after 0s
ChangeDetection.io App Test / test-application-3-12 (push) Canceled after 0s
ChangeDetection.io App Test / test-application-3-13 (push) Canceled after 0s
ChangeDetection.io App Test / test-application-3-14 (push) Canceled after 0s
GHSA-23mp-8222-96fr - reflected XSS in /diff/<uuid>/download-patch via from_version - Using built-in plain text response instead. Reported-by: Mayssare Amakhtari (@cy3erm)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> (#4324)
2026-08-24 16:24:22 +02:00

21 lines
929 B
Python

from flask import make_response
def plaintext_response(message, status):
"""
Error response for a body that may contain caller-supplied text.
Flask's make_response() defaults to Content-Type: text/html, so any user input echoed
into an error body becomes reflected XSS. That is the failure behind
GHSA-23mp-8222-96fr (/diff/<uuid>/download-patch), CVE-2026-27645 (/rss/watch/) and
CVE-2026-29038 (/rss/tag/) - three instances of one pattern. Forcing text/plain means
the browser will not parse the body as markup even if input does reach it.
Prefer validating input over relying on this, but use it on error paths regardless:
exception text routinely carries values nobody audited (selectors, timestamps,
filesystem paths from snapshot reads).
"""
response = make_response(message, status)
response.headers['Content-Type'] = 'text/plain; charset=utf-8'
return response