Skip to content

Commit

Permalink
Check origin
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Sep 12, 2024
1 parent 58b7f31 commit 9a38826
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src-admin/src/GoogleDrive.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ class GoogleDrive extends ConfigGeneric {

onMessage = (event) => {
console.log(event);
if (event.origin !== 'https://googleauth.iobroker.in') {
return;
}
if ((typeof event.data === 'string' && event.data.startsWith('google-authentication:')) ||
(typeof event.message === 'string' && event.message.startsWith('google-authentication:'))
) {
Expand Down

0 comments on commit 9a38826

Please sign in to comment.