-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
Hi!
This is related to #223. While skip-reading through related code, it came to my attention that the code at…
agent/apps/dbagent/src/lib/targetdb/unsafe-explain.ts
Lines 122 to 152 in 397bf8c
| private parseSingleQuotedString(): void { | |
| this.pos++; // Skip opening quote | |
| while (this.pos < this.len) { | |
| const char = this.input[this.pos]; | |
| if (char === "'") { | |
| this.pos++; | |
| return; | |
| } else if (char === '\\') { | |
| this.pos += 2; // Skip escaped character | |
| } else { | |
| this.pos++; | |
| } | |
| } | |
| throw new Error('Unterminated single-quoted string'); | |
| } | |
| private parseDoubleQuotedString(): void { | |
| this.pos++; // Skip opening quote | |
| while (this.pos < this.len) { | |
| const char = this.input[this.pos]; | |
| if (char === '"') { | |
| this.pos++; | |
| return; | |
| } else if (char === '\\') { | |
| this.pos += 2; // Skip escaped character | |
| } else { | |
| this.pos++; | |
| } | |
| } | |
| throw new Error('Unterminated double-quoted string'); | |
| } |
…seems to mishandle numeric escape sequences of than 2 characters:
I have not checked for the consequences of this issue.
Best, Sebastian
Metadata
Metadata
Assignees
Labels
No labels