Spiegel von
https://github.com/dani-garcia/vaultwarden.git
synchronisiert 2024-11-04 02:18:00 +01:00
Fixed icons and updated web-vault
Dieser Commit ist enthalten in:
Ursprung
d5486670d8
Commit
0e644d2711
7 geänderte Dateien mit 17 neuen und 15 gelöschten Zeilen
|
@ -47,7 +47,7 @@ Clone the web-vault outside the project:
|
||||||
git clone https://github.com/bitwarden/web.git web-vault
|
git clone https://github.com/bitwarden/web.git web-vault
|
||||||
```
|
```
|
||||||
|
|
||||||
Modify `web-vault/settings.json` to look like this:
|
Modify `web-vault/settings.Production.json` to look like this:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"appSettings": {
|
"appSettings": {
|
||||||
|
|
|
@ -16,9 +16,11 @@ pub fn routes() -> Vec<Route> {
|
||||||
|
|
||||||
#[get("/<domain>/icon.png")]
|
#[get("/<domain>/icon.png")]
|
||||||
fn icon(domain: String) -> Content<Vec<u8>> {
|
fn icon(domain: String) -> Content<Vec<u8>> {
|
||||||
|
let icon_type = ContentType::new("image", "x-icon");
|
||||||
|
|
||||||
// Validate the domain to avoid directory traversal attacks
|
// Validate the domain to avoid directory traversal attacks
|
||||||
if domain.contains("/") || domain.contains("..") {
|
if domain.contains("/") || domain.contains("..") {
|
||||||
return Content(ContentType::PNG, get_fallback_icon());
|
return Content(icon_type, get_fallback_icon());
|
||||||
}
|
}
|
||||||
|
|
||||||
let url = format!("https://icons.bitwarden.com/{}/icon.png", domain);
|
let url = format!("https://icons.bitwarden.com/{}/icon.png", domain);
|
||||||
|
@ -26,10 +28,10 @@ fn icon(domain: String) -> Content<Vec<u8>> {
|
||||||
// Get the icon, or fallback in case of error
|
// Get the icon, or fallback in case of error
|
||||||
let icon = match get_icon_cached(&domain, &url) {
|
let icon = match get_icon_cached(&domain, &url) {
|
||||||
Ok(icon) => icon,
|
Ok(icon) => icon,
|
||||||
Err(_) => return Content(ContentType::PNG, get_fallback_icon())
|
Err(_) => return Content(icon_type, get_fallback_icon())
|
||||||
};
|
};
|
||||||
|
|
||||||
Content(ContentType::PNG, icon)
|
Content(icon_type, icon)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_icon(url: &str) -> Result<Vec<u8>, reqwest::Error> {
|
fn get_icon(url: &str) -> Result<Vec<u8>, reqwest::Error> {
|
||||||
|
|
|
@ -32,9 +32,9 @@
|
||||||
<title page-title>bitwarden Web Vault</title>
|
<title page-title>bitwarden Web Vault</title>
|
||||||
|
|
||||||
<meta name="x-stylesheet-test" content="" class="fa invisible" />
|
<meta name="x-stylesheet-test" content="" class="fa invisible" />
|
||||||
<script src="js/fallback-styles.min.js?v=vmy29c"></script>
|
<script src="js/fallback-styles.min.js?v=twgcvb"></script>
|
||||||
|
|
||||||
<link rel="stylesheet" href="css/vault.min.css?v=vmy29c" />
|
<link rel="stylesheet" href="css/vault.min.css?v=twgcvb" />
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="images/icons/apple-touch-icon.png">
|
<link rel="apple-touch-icon" sizes="180x180" href="images/icons/apple-touch-icon.png">
|
||||||
<link rel="icon" type="image/png" sizes="32x32" href="images/icons/favicon-32x32.png">
|
<link rel="icon" type="image/png" sizes="32x32" href="images/icons/favicon-32x32.png">
|
||||||
<link rel="icon" type="image/png" sizes="16x16" href="images/icons/favicon-16x16.png">
|
<link rel="icon" type="image/png" sizes="16x16" href="images/icons/favicon-16x16.png">
|
||||||
|
@ -46,11 +46,11 @@
|
||||||
'control-sidebar-open': main.usingControlSidebar && main.openControlSidebar}">
|
'control-sidebar-open': main.usingControlSidebar && main.openControlSidebar}">
|
||||||
<div ui-view></div>
|
<div ui-view></div>
|
||||||
|
|
||||||
<script src="js/fallback-scripts.min.js?v=vmy29c"></script>
|
<script src="js/fallback-scripts.min.js?v=twgcvb"></script>
|
||||||
<script src="js/settings.js?v=vmy29c"></script>
|
<script src="js/settings.js?v=twgcvb"></script>
|
||||||
|
|
||||||
<script src="js/lib.min.js?v=vmy29c"></script>
|
<script src="js/lib.min.js?v=twgcvb"></script>
|
||||||
<script src="js/bw.min.js?v=vmy29c"></script>
|
<script src="js/bw.min.js?v=twgcvb"></script>
|
||||||
<script src="js/app.min.js?v=vmy29c"></script>
|
<script src="js/app.min.js?v=twgcvb"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
2
web-vault/js/app.min.js
gevendort
2
web-vault/js/app.min.js
gevendort
Dateidiff unterdrückt, weil mindestens eine Zeile zu lang ist
2
web-vault/js/fallback-styles.min.js
gevendort
2
web-vault/js/fallback-styles.min.js
gevendort
|
@ -1 +1 @@
|
||||||
var cacheTag="vmy29c";function loadStylesheetIfMissing(e,t,s){var i=document.getElementsByTagName("SCRIPT"),l=i[i.length-1].previousElementSibling,n=document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(l):l.currentStyle;if(n&&n[e]!==t)for(var o=0;o<s.length;o++)document.write('<link rel="stylesheet" href="'+s[o]+"?v="+cacheTag+'" />')}loadStylesheetIfMissing("visibility","hidden",["lib/bootstrap/css/bootstrap.min.css"]),loadStylesheetIfMissing("fontFamily","FontAwesome",["lib/font-awesome/css/font-awesome.min.css"]);
|
var cacheTag="twgcvb";function loadStylesheetIfMissing(e,t,s){var i=document.getElementsByTagName("SCRIPT"),l=i[i.length-1].previousElementSibling,n=document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(l):l.currentStyle;if(n&&n[e]!==t)for(var o=0;o<s.length;o++)document.write('<link rel="stylesheet" href="'+s[o]+"?v="+cacheTag+'" />')}loadStylesheetIfMissing("visibility","hidden",["lib/bootstrap/css/bootstrap.min.css"]),loadStylesheetIfMissing("fontFamily","FontAwesome",["lib/font-awesome/css/font-awesome.min.css"]);
|
2
web-vault/js/lib.min.js
gevendort
2
web-vault/js/lib.min.js
gevendort
Dateidiff unterdrückt, weil mindestens eine Zeile zu lang ist
|
@ -5,6 +5,6 @@
|
||||||
<title>U2F Connector</title>
|
<title>U2F Connector</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script src="js/u2f.min.js?v=vmy29c"></script>
|
<script src="js/u2f.min.js?v=twgcvb"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Laden …
In neuem Issue referenzieren