mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #4238 from thornbill/fix-router-xss
Fix XSS vulnerability in router
This commit is contained in:
commit
255df81375
1 changed files with 0 additions and 14 deletions
|
@ -59,8 +59,6 @@ class AppRouter {
|
|||
this.baseRoute = this.baseRoute.substring(0, this.baseRoute.length - 1);
|
||||
}
|
||||
|
||||
this.setBaseRoute();
|
||||
|
||||
// paths that start with a hashbang (i.e. /#!/page.html) get transformed to starting with //
|
||||
// we need to strip one "/" for our routes to work
|
||||
page('//*', (ctx) => {
|
||||
|
@ -68,18 +66,6 @@ class AppRouter {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
setBaseRoute() {
|
||||
let baseRoute = window.location.pathname.replace(this.getRequestFile(), '');
|
||||
if (baseRoute.lastIndexOf('/') === baseRoute.length - 1) {
|
||||
baseRoute = baseRoute.substring(0, baseRoute.length - 1);
|
||||
}
|
||||
console.debug('setting page base to ' + baseRoute);
|
||||
page.base(baseRoute);
|
||||
}
|
||||
|
||||
addRoute(path, newRoute) {
|
||||
page(path, this.getHandler(newRoute));
|
||||
this.allRoutes.push(newRoute);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue