1
0
Fork 1
Spiegel von https://github.com/dani-garcia/vaultwarden.git synchronisiert 2024-11-22 05:10:29 +01:00

Fixed icons and updated web-vault

Dieser Commit ist enthalten in:
Daniel García 2018-02-17 18:48:42 +01:00
Ursprung d5486670d8
Commit 0e644d2711
7 geänderte Dateien mit 17 neuen und 15 gelöschten Zeilen

Datei anzeigen

@ -47,7 +47,7 @@ Clone the web-vault outside the project:
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
{
"appSettings": {

Datei anzeigen

@ -16,9 +16,11 @@ pub fn routes() -> Vec<Route> {
#[get("/<domain>/icon.png")]
fn icon(domain: String) -> Content<Vec<u8>> {
let icon_type = ContentType::new("image", "x-icon");
// Validate the domain to avoid directory traversal attacks
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);
@ -26,10 +28,10 @@ fn icon(domain: String) -> Content<Vec<u8>> {
// Get the icon, or fallback in case of error
let icon = match get_icon_cached(&domain, &url) {
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> {

Datei anzeigen

@ -32,9 +32,9 @@
<title page-title>bitwarden Web Vault</title>
<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="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">
@ -46,11 +46,11 @@
'control-sidebar-open': main.usingControlSidebar && main.openControlSidebar}">
<div ui-view></div>
<script src="js/fallback-scripts.min.js?v=vmy29c"></script>
<script src="js/settings.js?v=vmy29c"></script>
<script src="js/fallback-scripts.min.js?v=twgcvb"></script>
<script src="js/settings.js?v=twgcvb"></script>
<script src="js/lib.min.js?v=vmy29c"></script>
<script src="js/bw.min.js?v=vmy29c"></script>
<script src="js/app.min.js?v=vmy29c"></script>
<script src="js/lib.min.js?v=twgcvb"></script>
<script src="js/bw.min.js?v=twgcvb"></script>
<script src="js/app.min.js?v=twgcvb"></script>
</body>
</html>

Dateidiff unterdrückt, weil mindestens eine Zeile zu lang ist

Datei anzeigen

@ -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"]);

Dateidiff unterdrückt, weil mindestens eine Zeile zu lang ist

Datei anzeigen

@ -5,6 +5,6 @@
<title>U2F Connector</title>
</head>
<body>
<script src="js/u2f.min.js?v=vmy29c"></script>
<script src="js/u2f.min.js?v=twgcvb"></script>
</body>
</html>