Skip to content

config: don't serve image blobs with Content-Disposition: inline#1811

Merged
alxndrsn merged 5 commits into
getodk:masterfrom
alxndrsn:config-blobs-not-content-disposition-inline
Apr 25, 2026
Merged

config: don't serve image blobs with Content-Disposition: inline#1811
alxndrsn merged 5 commits into
getodk:masterfrom
alxndrsn:config-blobs-not-content-disposition-inline

Conversation

@alxndrsn
Copy link
Copy Markdown
Contributor

@alxndrsn alxndrsn commented Apr 21, 2026

Introduced in #1769, logo and hero-image on the login page are displayed in <img> tags.

Content-Disposition: inline is a convenience to allow directly-linked images to display in the browser instead of downloading.

It's unlikely that login-page branding images would be directly linked.

What has been done to verify that this works as intended?

  • updated existing tests
  • tested with frontend that images are still displayed correctly on the login page:
Screenshot_2026-04-21_16-10-04

Why is this the best possible solution? Were any other approaches considered?

  1. Content-Disposition: inline is risky with user-submitted content, and should only be used when necessary.
  2. simplifies config/public: cache blob content #1810

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

Unlikely to have any effect as it's a new feature, and linking directly to config-blob-images is a surprising use case.

Does this change require updates to the API documentation? If so, please update docs/api.yaml as part of this PR.

No.

Before submitting this PR, please make sure you have:

  • run make test and confirmed all checks still pass, or witnessed Github completing all checks with success
  • verified that any code from external sources are properly credited in comments or that everything is internally sourced

@alxndrsn alxndrsn marked this pull request as ready for review April 21, 2026 11:15
@alxndrsn alxndrsn requested a review from matthew-white April 21, 2026 13:13
Comment thread lib/resources/config.js
Comment thread lib/resources/config.js
Comment thread test/integration/api/config.js Outdated
Comment thread test/integration/api/config.js
@alxndrsn alxndrsn merged commit b0097d2 into getodk:master Apr 25, 2026
5 checks passed
@alxndrsn alxndrsn deleted the config-blobs-not-content-disposition-inline branch April 25, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants