Archived
1
0

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", scheme: getFirstString(req.query["vscode-scheme"]) || "code-oss",
authority: getFirstString(req.query["vscode-authority"]), authority: getFirstString(req.query["vscode-authority"]),
path: getFirstString(req.query["vscode-path"]), 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"]), fragment: getFirstString(req.query["vscode-fragment"]),
}, },
// Make sure the map doesn't leak if nothing fetches this URI. // Make sure the map doesn't leak if nothing fetches this URI.