Skip to content

test: infamy: Keep the percent-encoded RESTCONF path with a zone id host - #1727

Merged
mattiaswal merged 1 commit into
mainfrom
restconf-key-requote
Oct 23, 2026
Merged

mattiaswal merged 1 commit into
mainfrom
restconf-key-requote

Conversation

@mattiaswal

@mattiaswal mattiaswal commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

A zone id like %sw2p2 is not a valid escape, so requests gives up on
its normal quoting and re-quotes every % in the URL, turning a key's
%2F into %252F. The workaround only restored the host, and rousette
aborts on the mangled key. QEMU never sees it since its zone names,
d4a say, happen to parse as escapes.

Description

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Test changes
    • Checked in changed Readme.adoc (make test-spec)
    • Added new test to group Readme.adoc and yaml file
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
    • ChangeLog updated (for major changes)
  • Other (please describe):

A zone id like %sw2p2 is not a valid escape, so requests gives up on
its normal quoting and re-quotes every % in the URL, turning a key's
%2F into %252F.  The workaround only restored the host, and rousette
aborts on the mangled key.  QEMU never sees it since its zone names,
d4a say, happen to parse as escapes.
@mattiaswal
mattiaswal requested a review from troglobit October 23, 2026 07:07
@mattiaswal
mattiaswal force-pushed the restconf-key-requote branch from 538006a to dd74889 Compare October 23, 2026 07:08
@mattiaswal mattiaswal changed the title Restconf key requote test: infamy: Keep the percent-encoded RESTCONF path with a zone id host Oct 23, 2026

@troglobit troglobit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two small notes, neither blocking:

  1. The URL is now sent exactly as built. Anything outside a list key that still needs encoding, such as a space in some hand-written path, used to be quoted by requests. Now http.client will reject it. I didn't find any test that does this, and list keys are fully encoded.
  2. The 502s mean rousette aborted on the malformed key (02%3A00… after decoding once) instead of answering 400. That's a robustness bug in rousette worth reporting upstream. The abort probably also explains the "broken RESTCONF frontend" in the tests that followed.

@mattiaswal

Copy link
Copy Markdown
Contributor Author

Two small notes, neither blocking:

  1. The URL is now sent exactly as built. Anything outside a list key that still needs encoding, such as a space in some hand-written path, used to be quoted by requests. Now http.client will reject it. I didn't find any test that does this, and list keys are fully encoded.
  2. The 502s mean rousette aborted on the malformed key (02%3A00… after decoding once) instead of answering 400. That's a robustness bug in rousette worth reporting upstream. The abort probably also explains the "broken RESTCONF frontend" in the tests that followed.

I know, but the problem is we are not using long from the latest version of rousette, not think it is worth it.

@troglobit

Copy link
Copy Markdown
Contributor

Failure in new FDB test on Alder and Styx expected, separate fix for that incoming in PR #1723.

@mattiaswal
mattiaswal merged commit 8421539 into main Oct 23, 2026
6 of 8 checks passed
@mattiaswal
mattiaswal deleted the restconf-key-requote branch October 23, 2026 08:25
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