Skip to content

Commit be5d4a5

Browse files
committed
Harden SmithyUri validation correctness
- Fix authority/path join bug in buildString() that produced invalid URIs like "https://example.comfoo" when path lacked leading slash - Add userInfo as a first-class field with getter, wither, and factory - Store IPv6 hosts unbracketed internally, bracket only in toString() - Normalize scheme and host to lowercase (of(URI) normalizes, component APIs reject uppercase) - Replace path/query/userInfo char denylist with RFC 3986 allowlists - Replace branching char validation with boolean[128] lookup tables - Fix withPath(null) returning new instance when path already empty - Fix hashCode() recomputing when actual hash is zero - Add equals() identity fast path - Reject opaque URIs and registry-based authorities in of(URI) - Reject IPv6 zone identifiers and bare brackets in host - Remove cached URI string from of(URI) to avoid inconsistency with normalized fields
1 parent 9f25944 commit be5d4a5

2 files changed

Lines changed: 467 additions & 69 deletions

File tree

0 commit comments

Comments
 (0)