mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-25 20:44:49 -04:00
Fix security related problems (#1522)
* Remove unnecessary capture group from regex Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> * Rename component to make name more expressive Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> * Remove redundant expression Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> * Filter vbscript links Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> * Remove superfluous parameter Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> * Check if handler is set Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> * Fix doc Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
0e512531a0
commit
87d6285da5
8 changed files with 17 additions and 11 deletions
|
@ -121,6 +121,9 @@ export abstract class WindowPostMessageCommunicator<
|
|||
protected handleEvent(event: MessageEvent<PostMessage<RECEIVE_TYPE>>): boolean | undefined {
|
||||
const data = event.data
|
||||
|
||||
if (!(data.type in this.handlers)) {
|
||||
return true
|
||||
}
|
||||
const handler = this.handlers[data.type]
|
||||
if (!handler) {
|
||||
return true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue