Merge pull request from GHSA-24m5-7vjx-9x37

* Restrict emby endpoints and proxy segments

* Dont allow path traversal in segments

* Restrict qbittorrent proxy endpoints

* Restrict npm proxy endpoints

* Restrict flood proxy endpoints

* Restrict tdarr proxy endpoints

* Restrict xteve proxy endpoints

* Restrict transmission proxy endpoints

* disallow non-mapped endpoints

this change drops all requests that have un-mapped endpoint queries

allowedEndpoints is added as a method to pass proxy requests via a regex on the endpoint

most widgets with custom proxies use either no endpoint, or a static one

Co-Authored-By: Ben Phelps <ben@phelps.io>
This commit is contained in:
shamoon 2024-06-02 20:11:03 -07:00
parent 8823b04291
commit b3cf985d4a
22 changed files with 78 additions and 35 deletions

View file

@ -9,7 +9,7 @@ export default function Component({ service }) {
const { widget } = service;
const { data: torrentData, error: torrentError } = useWidgetAPI(widget, "torrents/info");
const { data: torrentData, error: torrentError } = useWidgetAPI(widget, "torrents");
if (torrentError) {
return <Container service={service} error={torrentError} />;

View file

@ -2,6 +2,12 @@ import qbittorrentProxyHandler from "./proxy";
const widget = {
proxyHandler: qbittorrentProxyHandler,
mappings: {
torrents: {
endpoint: "torrents/info",
},
},
};
export default widget;