Skip to content

Commit

Permalink
concat string instead of string literals, since it breaking regex
Browse files Browse the repository at this point in the history
  • Loading branch information
lightyaer committed Jan 23, 2024
1 parent 3f5391c commit bd3b279
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/libsql-core/src/uri.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const AUTHORITY_RE = (() => {
const USERINFO = '(?<username>[^:]*)(:(?<password>.*))?';
const HOST = '((?<host>[^:\\[\\]]*)|(\\[(?<host_br>[^\\[\\]]*)\\]))';
const PORT = '(?<port>[0-9]*)';
return new RegExp(`^(${USERINFO}@)?${HOST}(:${PORT})?$`, "su");
return new RegExp("^(" + USERINFO + "@)?" + HOST + "(:" + PORT + ")?$", "su");
})();

// Query string is parsed as application/x-www-form-urlencoded according to the Web URL standard:
Expand Down

0 comments on commit bd3b279

Please sign in to comment.