Skip to content

fix(types): reject control characters in bucket names#84

Merged
shikhar merged 4 commits intomainfrom
codex/fix-issue-71
Feb 20, 2026
Merged

fix(types): reject control characters in bucket names#84
shikhar merged 4 commits intomainfrom
codex/fix-issue-71

Conversation

@shikhar
Copy link
Member

@shikhar shikhar commented Feb 20, 2026

Summary

  • reject control characters in BucketName::new
  • add a unit test covering newline input rejection

Testing

  • cargo +nightly fmt
  • cargo clippy --all-features --all-targets -- -D warnings --allow deprecated
  • cargo nextest run types::tests::bucket_name_rejects_control_characters

Closes #71

@greptile-apps
Copy link

greptile-apps bot commented Feb 20, 2026

Greptile Summary

Added validation to reject control characters in bucket names with a test verifying newline rejection.

  • Added char::is_control check to BucketName::new validation
  • New test bucket_name_rejects_control_characters covers the validation
  • Follows the project's testing conventions (unit tests in same file)
  • Consider extending this validation to ObjectKind and ObjectKey types as well

Confidence Score: 4/5

  • This PR is safe to merge with minimal risk
  • The change adds proper input validation with test coverage. Implementation is clean and follows Rust idioms. Minor consideration: similar types (ObjectKind, ObjectKey) could benefit from the same validation for consistency
  • No files require special attention

Important Files Changed

Filename Overview
src/types.rs Added control character validation to BucketName::new with corresponding test coverage

Last reviewed commit: 14dd5e3

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@shikhar shikhar merged commit e9d8acf into main Feb 20, 2026
5 checks passed
@shikhar shikhar deleted the codex/fix-issue-71 branch February 20, 2026 16:14
@github-actions github-actions bot mentioned this pull request Feb 20, 2026
shikhar pushed a commit that referenced this pull request Feb 20, 2026
## 🤖 New release

* `cachey`: 0.10.2 -> 0.10.3

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.10.3](0.10.2...0.10.3)
- 2026-02-20

### Fixed

- *(types)* reject control characters in bucket names
([#84](#84))
- *(object_store)* merge per-request timeout and retry overrides
([#85](#85))
- classify coalesced cache misses in PageGetExecutor
([#82](#82))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

[Detail Bug] c0_status panics on invalid header characters from URL-derived bucket/kind, causing DoS

1 participant

Comments