mirror of
https://github.com/bitwarden/browser
synced 2026-02-17 18:09:17 +00:00
[PM-25250] Prevent configuration and access of self hosted urls over http (#17095)
* feat: ban urls not using https * feat: add exception for dev env * feat: block fetching of insecure URLs * feat: add exception for dev env * feat: block notifications from using insecure URL * fix: bug where submission was possible regardless of error * feat: add exception for dev env * fix: missing constructor param
This commit is contained in:
9
libs/common/src/services/api-errors.ts
Normal file
9
libs/common/src/services/api-errors.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export class InsecureUrlNotAllowedError extends Error {
|
||||
constructor(url?: string) {
|
||||
if (url === undefined) {
|
||||
super("Insecure URL not allowed. All URLs must use HTTPS.");
|
||||
} else {
|
||||
super(`Insecure URL not allowed: ${url}. All URLs must use HTTPS.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user