mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
clean api url paths from directory traversal (#539)
This commit is contained in:
@@ -1616,6 +1616,9 @@ export class ApiService implements ApiServiceAbstraction {
|
|||||||
headers.set('User-Agent', this.customUserAgent);
|
headers.set('User-Agent', this.customUserAgent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clean path from directory traversal
|
||||||
|
path = path.split('../').join('');
|
||||||
|
|
||||||
const requestInit: RequestInit = {
|
const requestInit: RequestInit = {
|
||||||
cache: 'no-store',
|
cache: 'no-store',
|
||||||
credentials: this.getCredentials(),
|
credentials: this.getCredentials(),
|
||||||
|
|||||||
Reference in New Issue
Block a user