mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 04:23:32 +01:00
Enable no-case-declarations in codebase (#139243)
Fixes #139236
This can catch tricky programming mistakes that cause a runtime error. See 7e266b2c42 as an example of the type of bug this can prevent
This commit is contained in:
@@ -120,7 +120,7 @@ export function createServer(nonce: string) {
|
||||
const server = http.createServer(function (req, res) {
|
||||
const reqUrl = url.parse(req.url!, /* parseQueryString */ true);
|
||||
switch (reqUrl.pathname) {
|
||||
case '/signin':
|
||||
case '/signin': {
|
||||
const receivedNonce = ((reqUrl.query.nonce as string) || '').replace(/ /g, '+');
|
||||
if (receivedNonce === nonce) {
|
||||
deferredRedirect.resolve({ req, res });
|
||||
@@ -129,6 +129,7 @@ export function createServer(nonce: string) {
|
||||
deferredRedirect.resolve({ err, res });
|
||||
}
|
||||
break;
|
||||
}
|
||||
case '/':
|
||||
sendFile(res, path.join(__dirname, '../media/auth.html'), 'text/html; charset=utf-8');
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user