Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Override bytes_to_string#304

Merged
srikrsna-buf merged 2 commits into
mainbufbuild/protovalidate-java:mainfrom
sk/utf-8bufbuild/protovalidate-java:sk/utf-8Copy head branch name to clipboard
Jun 7, 2025
Merged

Override bytes_to_string#304
srikrsna-buf merged 2 commits into
mainbufbuild/protovalidate-java:mainfrom
sk/utf-8bufbuild/protovalidate-java:sk/utf-8Copy head branch name to clipboard

Conversation

@srikrsna-buf

@srikrsna-buf srikrsna-buf commented Jun 6, 2025

Copy link
Copy Markdown
Contributor

Override bytes_to_string to validate utf-8

@srikrsna-buf srikrsna-buf changed the title Override string_to_bytes Override bytes_to_string Jun 6, 2025

@timostamm timostamm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍, but please see comment below.

Comment on lines +77 to +81
/**
* This implementes that standard {@code bytes_to_string} function. We override it because the CEL
* library doesn't validate that the bytes are valid utf-8.
*/
private static CelFunctionBinding celBytesToString() {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you add a link to cel-expr/cel-java#716 ?

Base automatically changed from sk/cel to main June 6, 2025 19:53
Signed-off-by: Sri Krishna <skrishna@buf.build>
Signed-off-by: Sri Krishna <skrishna@buf.build>
@srikrsna-buf srikrsna-buf merged commit f17fd65 into main Jun 7, 2025
4 checks passed
@srikrsna-buf srikrsna-buf deleted the sk/utf-8 branch June 7, 2025 02:07
@chrispine

Copy link
Copy Markdown

Upstream fix has landed, so once that's released, we can remove this.

@chrispine

Copy link
Copy Markdown

cel-java 0.10.1 has now been released. Does that mean we should remove this workaround now? @srikrsna-buf

@chrispine

Copy link
Copy Markdown

Workaround removed in #327

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.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.