Skip to content

Conversation

@lzx404243
Copy link
Collaborator

@lzx404243 lzx404243 commented Aug 17, 2023

According to doc, the methods field is optional so the following should be a valid ip_allow config which allows all HTTP methods:

ip_allow:
  - apply: in
    ip_addrs: 0/0
    action: allow

However, ATS reports an error when parsing it.

The root cause is that yaml-cpp returns an invalid node for non-existent keys, which is fine, but it throws an exception when assigning the invalid node to another node. This PR prevents this and adds a test to exercise this case.

@lzx404243 lzx404243 self-assigned this Aug 17, 2023
@lzx404243 lzx404243 added the YAML label Aug 17, 2023
@lzx404243 lzx404243 added this to the 10.0.0 milestone Aug 17, 2023
Copy link
Member

@SolidWallOfCode SolidWallOfCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is, IMHO, a bug in YAML-CPP, that this is fixed by using a new variable.

@bneradt bneradt merged commit 541d174 into apache:master Aug 30, 2023
cmcfarlen pushed a commit to cmcfarlen/trafficserver that referenced this pull request Jun 3, 2024
* asf/master:
  Make bad disk detection more robust (apache#10317)
  Update Proxy Verifier to v2.10.1 (apache#10322)
  Fix lua plugin build (apache#10319)
  cmake: Add support for building benchmarks (apache#10316)
  cmake: add tests for proxy/http3 (apache#10310)
  Cmake: Add tests in proxy/http proxy/http2 (apache#10305)
  add tests for src/records (apache#10302)
  cmake: add unit tests for proxy/logging (apache#10301)
  setup default install path, runtime user and group (apache#10299)
  cmake: add tests for proxy/hdrs (apache#10283)
  Fix ip_allow optional methods specification (apache#10246)
  Plugin promotions, deprecations and deletions (apache#10303)
  Use Dbg() for debug output in both core and plugins. (apache#9732)
  Remove in_addr forward declaration from experimental.h. (apache#10309)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants