Skip to content

Patch config does not patch non read-only keys while a read-only key is included #2348

Description

@lovelaze

Versions

Core version is v6.0.5 (Latest: v6.0.5)
Web version is v6.0.2 (Latest: v6.0.2)
FTL version is v6.0.4 (Latest: v6.0.4)

Platform

  • OS and version: Debian 12
  • Platform: Docker

Expected behavior

A PATCH /config with a json payload of multiple fields where one of the keys are read-only results in a no-op.

This might be intended, however it's a bit confusing since making a POST /teleporter will just ignore all read-only keys, but in this case it simply ignores the request if a single key is read-only.

Is there another way to patch many config keys while ignoring read-only keys, without using teleporter?

Actual behavior / bug

It returns a 400 and has no effect on the other config keys requested to be patched.

Steps to reproduce

  1. Set a read-only key
    FTLCONF_dns_ignoreLocalhost=true

  2. Send a patch request
    PATCH /config

{
   "config":{
      "dns":{
         "ignoreLocalhost":false,
         "showDNSSEC":true
      }
   }
}
  1. Returns 400 and does not update showDNSSEC

Debug Token

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions