1
0
mirror of https://git.tuxpa.in/a/code-server.git synced 2024-12-28 21:25:25 +00:00

Simplify query concatenation in URL callback

Cases in URLs like ?&a=b or ?a=b& appear to be handled just fine.
This commit is contained in:
Asher 2020-12-18 11:21:32 -06:00
parent d14c2e5bb7
commit 5f7f7f1a92
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A

View File

@ -151,7 +151,7 @@ router.get("/callback", ensureAuthenticated, async (req, res) => {
scheme: getFirstString(req.query["vscode-scheme"]) || "code-oss",
authority: getFirstString(req.query["vscode-authority"]),
path: getFirstString(req.query["vscode-path"]),
query: (getFirstString(req.query.query) ? getFirstString(req.query.query) + "&" : "") + qs.stringify(query),
query: (getFirstString(req.query.query) || "") + "&" + qs.stringify(query),
fragment: getFirstString(req.query["vscode-fragment"]),
},
// Make sure the map doesn't leak if nothing fetches this URI.