mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-08-26 16:17:13 +00:00
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
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> (#4324)
21 lines
929 B
Python
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
|