Skip to content

fix: normalize boolean values consistently#5351

Merged
foosel merged 5 commits intoOctoPrint:devfrom
jacopotediosi:fix/booleans-normalization
Mar 30, 2026
Merged

fix: normalize boolean values consistently#5351
foosel merged 5 commits intoOctoPrint:devfrom
jacopotediosi:fix/booleans-normalization

Conversation

@jacopotediosi
Copy link
Copy Markdown
Member

@jacopotediosi jacopotediosi commented Mar 29, 2026

  • You have read through CONTRIBUTING.md
  • Your changes are not possible to do through a plugin and relevant
    to a large audience (ideally all users of OctoPrint)
  • If your changes are large or otherwise disruptive: You have
    made sure your changes don't interfere with current development by
    talking it through with the maintainers, e.g. through a
    Brainstorming ticket
  • Your PR targets OctoPrint's dev branch
  • Your PR was opened from a custom branch on your repository
    (no PRs from your version of main, bugfix, next or dev
    please), e.g. wip/my_new_feature or wip/my_bugfix
  • Your PR only contains relevant changes: no unrelated files,
    no dead code, ideally only one commit - rebase and squash your PR
    if necessary!
  • If your changes include style sheets: You have modified the
    .less source files, not the .css files (those are generated
    with lessc)
  • You have tested your changes (please state how!) - ideally you
    have added unit tests
  • You have run the existing unit tests against your changes and
    nothing broke (pytest)
  • You have run the included pre-commit suite against your changes
    and nothing broke (pre-commit run --all-files)
  • You have added yourself to the AUTHORS.md file :)

What does this PR do and why is it necessary?

I found that in some parts of the codebase, boolean values were not being obtained/validated/converted checking against valid_boolean_trues. This could lead to interpreting the string false as True, for example when retrieved from config.yaml or from user-provided inputs.

This PR fixes all such occurrences.

How was it tested? How can it be tested by the reviewer?

Go to http://127.0.0.1:5000/reverse_proxy_test/?authenticated=false
Before this PR, it showed the authenticated version of the reverse proxy test page, even if the authenticated parameter was false.
After this PR, it correctly shows the unauthenticated version of the page.

Was any kind of genAI (ChatGPT, Copilot etc) involved in creating this PR? Which one and how?

No

Any background context you want to provide?

What are the relevant tickets if any?

Screenshots (if appropriate)

Further notes

@github-actions github-actions Bot added targets dev The PR targets the dev branch approved Issue has been approved by the bot or manually for further processing labels Mar 29, 2026
@foosel foosel merged commit 0f7274a into OctoPrint:dev Mar 30, 2026
30 checks passed
@jacopotediosi jacopotediosi deleted the fix/booleans-normalization branch March 30, 2026 10:10
@jacopotediosi jacopotediosi added this to the 2.0.0 milestone Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Issue has been approved by the bot or manually for further processing targets dev The PR targets the dev branch

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants