mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-19 09:25:34 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/25435: Handle ERROR_BAD_HSTS_CERT error.
This commit is contained in:
parent
2e2a86fc32
commit
84d848d10f
@ -188,6 +188,7 @@ class AppRequestInterceptor(private val context: Context) : RequestInterceptor {
|
|||||||
ErrorType.ERROR_UNKNOWN_PROXY_HOST,
|
ErrorType.ERROR_UNKNOWN_PROXY_HOST,
|
||||||
ErrorType.ERROR_NO_INTERNET,
|
ErrorType.ERROR_NO_INTERNET,
|
||||||
ErrorType.ERROR_HTTPS_ONLY,
|
ErrorType.ERROR_HTTPS_ONLY,
|
||||||
|
ErrorType.ERROR_BAD_HSTS_CERT,
|
||||||
ErrorType.ERROR_UNKNOWN_PROTOCOL -> RiskLevel.Low
|
ErrorType.ERROR_UNKNOWN_PROTOCOL -> RiskLevel.Low
|
||||||
|
|
||||||
ErrorType.ERROR_SECURITY_BAD_CERT,
|
ErrorType.ERROR_SECURITY_BAD_CERT,
|
||||||
|
@ -12,6 +12,7 @@ function parseQuery(queryString) {
|
|||||||
const query = Object.fromEntries(new URLSearchParams(queryString).entries());
|
const query = Object.fromEntries(new URLSearchParams(queryString).entries());
|
||||||
injectValues(query);
|
injectValues(query);
|
||||||
updateShowSSL(query);
|
updateShowSSL(query);
|
||||||
|
updateShowHSTS(query);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -71,6 +72,24 @@ function updateShowSSL(queryMap) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to show or hide the "advanced" button based for the HSTS error page
|
||||||
|
*/
|
||||||
|
function updateShowHSTS(queryMap) {
|
||||||
|
/** @type {'true' | 'false'} */
|
||||||
|
const showHSTS = queryMap.showHSTS;
|
||||||
|
if (typeof document.addCertException === "undefined") {
|
||||||
|
document.getElementById('advancedButton').style.display='none';
|
||||||
|
} else {
|
||||||
|
if (showHSTS === 'true') {
|
||||||
|
document.getElementById('advancedButton').style.display='block';
|
||||||
|
document.getElementById('advancedPanelAcceptButton').style.display='none';
|
||||||
|
} else {
|
||||||
|
document.getElementById('advancedButton').style.display='none';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to display information about the SSL certificate in `error_pages.html`
|
* Used to display information about the SSL certificate in `error_pages.html`
|
||||||
*/
|
*/
|
||||||
|
@ -151,6 +151,7 @@ class AppRequestInterceptor(
|
|||||||
ErrorType.ERROR_UNKNOWN_PROXY_HOST,
|
ErrorType.ERROR_UNKNOWN_PROXY_HOST,
|
||||||
ErrorType.ERROR_NO_INTERNET,
|
ErrorType.ERROR_NO_INTERNET,
|
||||||
ErrorType.ERROR_HTTPS_ONLY,
|
ErrorType.ERROR_HTTPS_ONLY,
|
||||||
|
ErrorType.ERROR_BAD_HSTS_CERT,
|
||||||
ErrorType.ERROR_UNKNOWN_PROTOCOL -> RiskLevel.Low
|
ErrorType.ERROR_UNKNOWN_PROTOCOL -> RiskLevel.Low
|
||||||
|
|
||||||
ErrorType.ERROR_SECURITY_BAD_CERT,
|
ErrorType.ERROR_SECURITY_BAD_CERT,
|
||||||
|
Loading…
Reference in New Issue
Block a user