-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
bugIncorrect behavior in the current implementation that needs fixingIncorrect behavior in the current implementation that needs fixingwasi:implIssues pertaining to WASI implementation in WasmtimeIssues pertaining to WASI implementation in Wasmtime
Description
According to RFC 3986 §3.3, the following predicate should define the valid characters in a path component (besides the /
and ?
delimiters):
fn is_valid_path_char(ch: char) -> bool {
// pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
ch.is_ascii_alphanumeric() || "-._~".contains(ch) // unreserved
|| ch == '%' // pct-encoded
|| "!$&'()*+,;=".contains(ch) // sub-delims
|| ":@".contains(ch)
}
However, the following paths are accepted via request.set_path_and_query
:
/"
/{
/|
/}
/^
/[
/]
/\
/#
What should change here, the spec or Wasmtime?
Relatedly, Wasmtime accepts non-absolute paths, which I am not sure are valid; WebAssembly/wasi-http#178 (comment).
Metadata
Metadata
Assignees
Labels
bugIncorrect behavior in the current implementation that needs fixingIncorrect behavior in the current implementation that needs fixingwasi:implIssues pertaining to WASI implementation in WasmtimeIssues pertaining to WASI implementation in Wasmtime