mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
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:
@@ -11,7 +11,7 @@ const headerCacheKey = `${proxyName}__headers`;
|
||||
const logger = createLogger(proxyName);
|
||||
|
||||
export default async function transmissionProxyHandler(req, res) {
|
||||
const { group, service, endpoint } = req.query;
|
||||
const { group, service } = req.query;
|
||||
|
||||
if (!group || !service) {
|
||||
logger.debug("Invalid or missing service '%s' or group '%s'", service, group);
|
||||
@@ -35,7 +35,7 @@ export default async function transmissionProxyHandler(req, res) {
|
||||
|
||||
const api = `${widget.url}${widget.rpcUrl || widgets[widget.type].rpcUrl}rpc`;
|
||||
|
||||
const url = new URL(formatApiCall(api, { endpoint, ...widget }));
|
||||
const url = new URL(formatApiCall(api, { endpoint: undefined, ...widget }));
|
||||
const csrfHeaderName = "x-transmission-session-id";
|
||||
|
||||
const method = "POST";
|
||||
|
||||
Reference in New Issue
Block a user