mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-23 02:06:29 -05:00
Fix regex DoS (#1533)
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
6adb63967b
commit
f937dc6962
2 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@ import { Logger } from '../../../../utils/logger'
|
||||||
type highlightJsImport = typeof import('../../../common/hljs/hljs')
|
type highlightJsImport = typeof import('../../../common/hljs/hljs')
|
||||||
|
|
||||||
const log = new Logger('Autocompletion > CodeBlock')
|
const log = new Logger('Autocompletion > CodeBlock')
|
||||||
const wordRegExp = /^```((?:\w|-|_|\+)*)$/
|
const wordRegExp = /^```((?:\w|-|\+)*)$/
|
||||||
let allSupportedLanguages: string[] = []
|
let allSupportedLanguages: string[] = []
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { Editor, Hint, Hints, Pos } from 'codemirror'
|
||||||
import { validAlertLevels } from '../../../markdown-renderer/markdown-it-plugins/alert-container'
|
import { validAlertLevels } from '../../../markdown-renderer/markdown-it-plugins/alert-container'
|
||||||
import { findWordAtCursor, Hinter } from './index'
|
import { findWordAtCursor, Hinter } from './index'
|
||||||
|
|
||||||
const wordRegExp = /^:::((?:\w|-|_|\+)*)$/
|
const wordRegExp = /^:::((?:\w|-|\+)*)$/
|
||||||
const spoilerSuggestion: Hint = {
|
const spoilerSuggestion: Hint = {
|
||||||
text: ':::spoiler Toggle label\nToggled content\n::: \n',
|
text: ':::spoiler Toggle label\nToggled content\n::: \n',
|
||||||
displayText: 'spoiler'
|
displayText: 'spoiler'
|
||||||
|
|
Loading…
Reference in a new issue