Skip to content

Commit 1c639cc

Browse files
committed
check only one double quote str
1 parent 4b4f24f commit 1c639cc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/common/jsonb/src/functions.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,12 @@ pub fn parse_json_path(path: &[u8]) -> Result<Vec<JsonPath>, Error> {
849849
} else if c != b'"' {
850850
idx += 1;
851851
} else {
852-
break;
852+
// Try to read to check if has another '"ab"', if has return err
853+
let c = read_char(path, &mut idx);
854+
match c {
855+
Ok(_) => return Err(Error::InvalidToken),
856+
Err(_) => break,
857+
}
853858
}
854859
}
855860
let s = std::str::from_utf8(&path[prev_idx..idx - 1])?;

0 commit comments

Comments
 (0)