Files
tauri-plugins-workspace/examples/api/src-tauri/capabilities/base.json
T
Christopher PruijsenandLucas Nogueira 0e17675653 fix(http): decode header values as ISO-8859-1 (#3586)
* fix(http): decode response header values as ISO-8859-1

Response header values were decoded with String::from_utf8 before being
sent over IPC. Raw UTF-8 bytes produced JS strings with code points
above 255, which new Headers() rejects as invalid ByteStrings
("Type error" on WebKit), and bytes that were not valid UTF-8 failed
the fetch outright. Decode as ISO-8859-1 instead so every byte maps to a
char 0-255, matching what browsers expose for the same response.

Fixes #2898

* fix(http): add tests for ISO-8859-1 response header decoding

Cover the #2898 Content-Disposition case and non-UTF-8 header bytes on
the same conversion fetch_send uses, so a revert to UTF-8 fails the suite.

* request headers, e2e test

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
2026-10-13 14:43:50 -03:00

148 lines
3.2 KiB
JSON

{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "run-app-base",
"description": "Base permissions to run the app",
"windows": ["main"],
"permissions": [
"log:default",
{
"identifier": "http:default",
"allow": [
"https://tauri.app",
{
"url": "http://localhost:3003"
},
{
"url": "http://127.0.0.1:3004"
}
]
},
"core:default",
"core:app:allow-set-app-theme",
"core:window:allow-minimize",
"core:window:allow-toggle-maximize",
"core:window:allow-set-size",
"core:window:allow-close",
"core:webview:allow-create-webview-window",
"core:window:allow-start-dragging",
"notification:default",
"os:default",
"os:allow-hostname",
"dialog:default",
{
"identifier": "shell:allow-spawn",
"allow": [
{
"name": "sh",
"cmd": "sh",
"args": [
"-c",
{
"validator": ".+"
}
]
},
{
"name": "cmd",
"cmd": "cmd",
"args": [
"/C",
{
"validator": ".+"
}
]
}
]
},
{
"identifier": "shell:allow-execute",
"allow": [
{
"name": "sh",
"cmd": "sh",
"args": [
"-c",
{
"validator": ".+"
}
]
},
{
"name": "cmd",
"cmd": "cmd",
"args": [
"/C",
{
"validator": ".+"
}
]
}
]
},
"shell:default",
"shell:allow-kill",
"shell:allow-stdin-write",
"process:allow-exit",
"process:allow-restart",
"clipboard-manager:allow-read-text",
"clipboard-manager:allow-write-text",
"clipboard-manager:allow-read-image",
"clipboard-manager:allow-write-image",
"clipboard-manager:allow-write-html",
"clipboard-manager:allow-clear",
"fs:default",
"fs:read-meta",
"fs:allow-open",
"fs:allow-write",
"fs:allow-read",
"fs:allow-rename",
"fs:allow-mkdir",
"fs:allow-remove",
"fs:allow-write-text-file",
"fs:allow-write-file",
"fs:allow-create",
"fs:allow-copy-file",
"fs:allow-seek",
"fs:allow-truncate",
"fs:allow-ftruncate",
"fs:allow-unwatch",
"fs:scope-download-recursive",
"fs:scope-resource-recursive",
{
"identifier": "fs:scope-appdata-recursive",
"allow": [
{
"path": "$APPDATA/db/"
},
{
"path": "$APPDATA/db/**"
}
],
"deny": ["$APPDATA/db/*.stronghold"]
},
"store:default",
"opener:default",
{
"identifier": "opener:allow-open-url",
"allow": [
{
"url": "https://*",
"app": "inAppBrowser"
}
]
},
{
"identifier": "opener:allow-open-path",
"allow": [{ "path": "$APPDATA" }, { "path": "$APPDATA/**" }]
},
"upload:default",
"deep-link:default",
"deep-link:allow-register",
"deep-link:allow-unregister",
"deep-link:allow-is-registered",
"sql:default",
"sql:allow-execute",
"websocket:default"
]
}