File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed
Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 293293 "scope" : " window" ,
294294 "minimum" : 0 ,
295295 "description" : " Report a warning for any join order whose metric exceeds this value."
296+ },
297+ "codeQL.allowHttp" : {
298+ "type" : " boolean" ,
299+ "default" : false ,
300+ "description" : " Allow databased to be downloaded via HTTP"
296301 }
297302 }
298303 },
Original file line number Diff line number Diff line change @@ -608,3 +608,12 @@ export const CODESPACES_TEMPLATE = new Setting(
608608export function isCodespacesTemplate ( ) {
609609 return ! ! CODESPACES_TEMPLATE . getValue < boolean > ( ) ;
610610}
611+
612+ export const ALLOW_HTTP = new Setting (
613+ "allowHttp" ,
614+ ROOT_SETTING ,
615+ ) ;
616+
617+ export function allowHttp ( ) : boolean {
618+ return ALLOW_HTTP . getValue < boolean > ( ) || false ;
619+ }
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import {
2727} from "./common/github-url-identifier-helper" ;
2828import { Credentials } from "./common/authentication" ;
2929import { AppCommandManager } from "./common/commands" ;
30+ import { ALLOW_HTTP } from "./config" ;
3031
3132/**
3233 * Prompts a user to fetch a database from a remote location. Database is assumed to be an archive file.
@@ -49,7 +50,9 @@ export async function promptImportInternetDatabase(
4950 return ;
5051 }
5152
52- validateHttpsUrl ( databaseUrl ) ;
53+ if ( ! ALLOW_HTTP . getValue ( ) ) {
54+ validateHttpsUrl ( databaseUrl ) ;
55+ }
5356
5457 const item = await databaseArchiveFetcher (
5558 databaseUrl ,
You can’t perform that action at this time.
0 commit comments