Skip to content

Deny unknown fields in users#303

Merged
niclaflamme merged 1 commit intomainfrom
nic/users_deny_unknown_fields
Aug 4, 2025
Merged

Deny unknown fields in users#303
niclaflamme merged 1 commit intomainfrom
nic/users_deny_unknown_fields

Conversation

@niclaflamme
Copy link
Contributor

Context

  • Discovered that it was almost impossible to fail a /users.toml validation because these extra values just get ignored.
  • This means that pgdogdev/docs cannot be validated.
  • This is because every docs' toml snippet has to either pass users.toml validation or pgdog.toml validation.
  • Without #[serde(deny_unknown_fields)], it's very hard to fail a users verification.
  • The pgdog.toml snippet is not labeled, so the broken pgdog.toml was being accepted as a users.toml.
[invalid_field]
always_passes = true

Changes

  • add #[serde(deny_unknown_fields)] to config::Users

@niclaflamme niclaflamme requested a review from levkk August 4, 2025 16:24
@niclaflamme niclaflamme merged commit 962d2d7 into main Aug 4, 2025
5 checks passed
@niclaflamme niclaflamme deleted the nic/users_deny_unknown_fields branch August 4, 2025 16:39
dev-lew pushed a commit to dev-lew/pgdog that referenced this pull request Feb 18, 2026
Changes
- Add #[serde(deny_unknown_fields)] to config::Users
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