Skip to content

Commit ccddbb1

Browse files
committed
Improve DTD/XSD security with regard to remote resources
Fixes #671 Signed-off-by: azerr <[email protected]>
1 parent 2b7e607 commit ccddbb1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/commands/registerCommands.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@ function registerCodeLensReferencesCommands(context: ExtensionContext, languageC
121121
*/
122122
function registerValidationCommands(context: ExtensionContext) {
123123
// Revalidate current file
124-
context.subscriptions.push(commands.registerCommand(ClientCommandConstants.VALIDATE_CURRENT_FILE, async (params) => {
124+
context.subscriptions.push(commands.registerCommand(ClientCommandConstants.VALIDATE_CURRENT_FILE, async (identifierParam, validationArgs) => {
125+
if (identifierParam) {
126+
return await commands.executeCommand(ClientCommandConstants.EXECUTE_WORKSPACE_COMMAND, ServerCommandConstants.VALIDATE_CURRENT_FILE, identifierParam, validationArgs);
127+
}
125128
const uri = window.activeTextEditor.document.uri;
126129
const identifier = TextDocumentIdentifier.create(uri.toString());
127130
commands.executeCommand(ClientCommandConstants.EXECUTE_WORKSPACE_COMMAND, ServerCommandConstants.VALIDATE_CURRENT_FILE, identifier).

0 commit comments

Comments
 (0)