mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-29 21:32:44 -08:00
fix(cef): check origin in permission policy
This commit is contained in:
1 file changed
+6
-1
@@ -123,7 +123,12 @@ fn main() {
|
||||
tauri_runtime_cef::set_permission_policy(move |request, responder| {
|
||||
use tauri_runtime_cef::{DenyReason, PermissionKind};
|
||||
|
||||
if request.webview_label != "main" {
|
||||
if request.webview_label != "main"
|
||||
|| !request
|
||||
.origin
|
||||
.as_ref()
|
||||
.is_some_and(|origin| origin.is_app_local())
|
||||
{
|
||||
return responder.deny(DenyReason::NoPolicy);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user