Skip to content

Make Polaris safe against certain unparseable locations #552

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
snazy opened this issue Dec 14, 2024 · 3 comments
Open

Make Polaris safe against certain unparseable locations #552

snazy opened this issue Dec 14, 2024 · 3 comments
Assignees
Labels
1.0-blocker bug Something isn't working
Milestone

Comments

@snazy
Copy link
Member

snazy commented Dec 14, 2024

Using java.net.URI for paths/locations generated/used by Apache Iceberg is particularly unsafe.

Characters that are illegal in URI string representations are not escaped by Iceberg and lead to runtime exceptions when parsed for example by java.net.URI.create(String).

Example: A legit column/partition-field name "_foo_bar_" will end "as is" in any path generated by Iceberg, leading to Caused by: java.lang.IllegalArgumentException: Illegal character in path at index ....

The safest approach to prevent this issue entirely is to have a dedicated class that deals with "unsafe encodings", maybe call it "StorageUri".

Mixing "unsafe" and "safe" encodings will cause errors.

@snazy snazy added the bug Something isn't working label Dec 14, 2024
@flyrain flyrain added this to the 1.0.0 milestone Mar 14, 2025
@flyrain
Copy link
Contributor

flyrain commented Apr 29, 2025

Hi @snazy , can you provide more details of which part of Polaris code has this issue?

@flyrain
Copy link
Contributor

flyrain commented May 16, 2025

Related PR: #1586

@dimas-b
Copy link
Contributor

dimas-b commented May 16, 2025

More specific issue: #1545

PR #1586 may not be sufficient for this issue. If it is merged with its current scope more end-to-end testing will still be required with odd base URI to ensure correct operation. Before #1586, end-to-end testing is not possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0-blocker bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants