Skip to content

Commit

Permalink
blog: WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ArhanChaudhary committed Aug 26, 2024
1 parent 054d735 commit b54edf9
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/content/blog/Implanting a VSCode Rickroll.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
description: Exploiting a silly oversight in a popular extension
---
https://github.com/microsoft/vscode-pull-request-github/pull/3122

`src/issues/userHoverProvider.ts`

```js
const username = match[1];
// JS and TS doc checks
if (((document.languageId === 'javascript') || (document.languageId === 'typescript'))
&& JSDOC_NON_USERS.indexOf(username) >= 0) {
return;
}
// PHP doc checks
if ((document.languageId === 'php') && PHPDOC_NON_USERS.indexOf(username) >= 0) {
return;
}
const isDoxygenLanguage = document.languageId === 'cpp' || document.languageId === 'c' || document.languageId === 'csharp' || document.languageId === 'java' || document.languageId === 'objective-c' || document.languageId === 'php';
if (isDoxygenLanguage && DOXYGEN_NON_USERS.indexOf(username) >= 0) {
return;
}
return this.createHover(document.uri, username, wordPosition);
```

0 comments on commit b54edf9

Please sign in to comment.