apache / apache/polaris

Make Polaris safe against certain unparseable locations

Open
#552 5 comments 0 reactions 1 assignee Claimed by @adnanhemani View on GitHub
bug
Dominant language
Java
Stars
2.1k
Forks
522
Avg merge
2d 1h
Merged PRs (30d)
140

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.