Skip to content

fix(rest): reject empty namespace separators - #740

Merged
wgtmac merged 1 commit into
apache:mainfrom
fallintoplace:fix/rest-empty-namespace-separator
Jun 16, 2026
Merged

fix(rest): reject empty namespace separators#740
wgtmac merged 1 commit into
apache:mainfrom
fallintoplace:fix/rest-empty-namespace-separator

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

Summary

  • Reject empty REST namespace separators in namespace encode/decode helpers.
  • Reject empty namespace separators when constructing ResourcePaths.
  • Add regression coverage for direct helper calls and the resource path config boundary.

Why

DecodeNamespace advances by separator.size() after each match. An empty separator never advances the cursor, so a misconfigured separator can hang namespace parsing.

Testing

  • cmake -S . -B build-rest -G Ninja -DICEBERG_BUILD_BUNDLE=OFF -DICEBERG_BUILD_REST=ON -DICEBERG_BUILD_HIVE=OFF -DICEBERG_BUILD_SQL_CATALOG=OFF
  • cmake --build build-rest --target rest_catalog_test
  • ctest --test-dir build-rest -R rest_catalog_test --output-on-failure

@wgtmac

wgtmac commented Jun 15, 2026

Copy link
Copy Markdown
Member

Could you please fix the ci failure and use conventional commit title for consistency?

@fallintoplace fallintoplace changed the title Reject empty REST namespace separators fix(rest): reject empty namespace separators Jun 15, 2026
@fallintoplace
fallintoplace force-pushed the fix/rest-empty-namespace-separator branch from 7f19e88 to 9cba02f Compare June 15, 2026 16:21
@wgtmac
wgtmac merged commit fc9781f into apache:main Jun 16, 2026
20 checks passed
@wgtmac

wgtmac commented Jun 16, 2026

Copy link
Copy Markdown
Member

Thank you, @fallintoplace!

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