fix security issue sonarqube detected
This commit is contained in:
parent
d23ec577a0
commit
2f207a274a
1 changed files with 4 additions and 0 deletions
|
|
@ -198,6 +198,10 @@ self.addEventListener('push', async (event) => {
|
|||
self.addEventListener('message', async (event) => {
|
||||
await setSettings()
|
||||
const { type, content } = event.data
|
||||
if (self.location.origin !== event.origin) {
|
||||
console.error('SW Message with strange origin received', event)
|
||||
return
|
||||
}
|
||||
|
||||
if (type === 'desktopNotification') {
|
||||
const { title, ...rest } = content
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue