Lançamento da versão 1.0.10
This commit is contained in:
@@ -81,7 +81,7 @@
|
||||
}
|
||||
|
||||
for (const origin of candidates) {
|
||||
if (ALLOWED_TOP_MESSAGE_ORIGINS.has(origin)) {
|
||||
if (isAllowedTopMessageOrigin(origin)) {
|
||||
return origin;
|
||||
}
|
||||
}
|
||||
@@ -89,6 +89,25 @@
|
||||
return "";
|
||||
}
|
||||
|
||||
function isAllowedTopMessageOrigin(origin) {
|
||||
if (ALLOWED_TOP_MESSAGE_ORIGINS.has(origin)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
try {
|
||||
const url = new URL(origin);
|
||||
const hostname = url.hostname.toLowerCase();
|
||||
|
||||
return (
|
||||
url.protocol === "https:" &&
|
||||
hostname.endsWith(".oraclecloud.com") &&
|
||||
hostname.includes(".fa.")
|
||||
);
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function safePostToTop(payload) {
|
||||
const targetOrigin = getAllowedTopMessageOrigin();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user