Skip to content

Commit

Permalink
Slimmed down a key file
Browse files Browse the repository at this point in the history
Closes cloverleaf#115. Also added SRI hashes to ensure you're not running code you shouldn't be.
  • Loading branch information
ChildishGiant committed Apr 11, 2020
1 parent 9c4855e commit 26f5c3b
Show file tree
Hide file tree
Showing 12 changed files with 150 additions and 49 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ I use [GitKraken](https://www.gitkraken.com/) as my git GUI.

Thanks to [RealFaviconGenerator](https://realfavicongenerator.net) for making a glorious website that makes making favicons easy.


## Licensing

**A full licensing report can be found on [FOSSA](https://app.fossa.com/reports/50704854-c664-4b03-94a6-683674bae968?ref=badge_shield)**
Expand All @@ -73,7 +72,6 @@ The [Materialize Framework](https://github.com/Dogfalo/materialize) under the [M

[Material Design icons DX](https://github.com/jossef/material-design-icons-iconfont) under [Apache License 2.0](https://github.com/jossef/material-design-icons-iconfont/blob/master/LICENSEs) (Forked from [Material Design icons](https://github.com/google/material-design-icons))


## Misc

Idea stolen from [Master Password](https://masterpasswordapp.com/). [More info](https://cloverleaf.app/faq#remake)
14 changes: 0 additions & 14 deletions bundles/bundle-8fe1ca85.js

This file was deleted.

30 changes: 30 additions & 0 deletions bundles/bundle-fa4c3f20.js

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion config/webpack/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const fs = require("fs");
const rimraf = require("rimraf");
const translation = require("./translation.js");
const SriPlugin = require("webpack-subresource-integrity");

// Wipe old bundles
rimraf.sync("bundles/");
Expand Down Expand Up @@ -34,7 +35,12 @@ const configPromise = new Promise(function (resolve, reject) {
plugins: plugins.concat([
new MiniCssExtractPlugin({
filename: "bundle-[Contenthash:8].css",
})
}),
new SriPlugin({
hashFuncNames: ["sha256"],
enabled: process.env.NODE_ENV === "production",
}),
new webpack.ProvidePlugin({Component: "exports-loader?Component!materialize-css/js/component.js"})
]),

module: {
Expand Down Expand Up @@ -86,6 +92,7 @@ const configPromise = new Promise(function (resolve, reject) {

entry: "./src/main.js",
output: {
crossOriginLoading: "anonymous",
filename: "bundle-[Contenthash:8].js",
path: path.resolve(__dirname, "../../bundles")
}
Expand Down
2 changes: 1 addition & 1 deletion de-DE.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang="de-DE"><head><meta charset="utf-8"><title>Cloverleaf</title><meta name="viewport" content="minimum-scale=1,initial-scale=1"><meta name="description" content="Cloverleaf ist eine gratis, Open-Source App um deinen Passwortmanager zu ersetzen ohne deine Passwörter irgendwo zu speichern."><meta name="robots" content="index, nofollow"><meta name="author" content="ChildishGiant"><meta name="keywords" content="password manager, password generator, security, open source, cloverleaf, perdola, cloverleaf app, cloverleaf.app"><link rel="alternate" href="https://cloverleaf.app/" hreflang="en"><meta name="msvalidate.01" content="22AEF740B887329DA98B4F687396B7C1"><meta name="mobile-web-app-capable" content="yes"><meta property="og:description" content="Cloverleaf ist eine gratis, Open-Source App um deinen Passwortmanager zu ersetzen ohne deine Passwörter irgendwo zu speichern."><meta property="og:title" content="Cloverleaf"><meta property="og:type" content="website"><meta property="og:url" content="https://cloverleaf.app"><meta property="og:image" content="https://cloverleaf.app/android-chrome-512x512.png"><meta property="og:image:secure_url" content="https://cloverleaf.app/android-chrome-512x512.png"><meta property="og:image:width" content="512"><meta property="og:image:height" content="512"><meta property="og:locale" content="en_GB"><meta name="twitter:card" content="summary"><meta name="twitter:creator" content="@ChildishGiant"><meta name="twitter:creator:id" content="871150969417084928"><meta name="twitter:title" content="Cloverleaf"><meta name="twitter:description" content="Cloverleaf ist eine gratis, Open-Source App um deinen Passwortmanager zu ersetzen ohne deine Passwörter irgendwo zu speichern."><meta name="twitter:image" content="https://cloverleaf.app/android-chrome-512x512.png"><link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png"><link rel="manifest" href="manifest.json"><link rel="mask-icon" href="safari-pinned-tab.svg" color="#8c97ce"><link rel="shortcut icon" href="favicon.ico"><meta name="apple-mobile-web-app-title" content="Cloverleaf"><meta name="application-name" content="Cloverleaf"><meta name="msapplication-TileColor" content="#8c97ce"><meta name="theme-color" content="#ffffff"><script>console.clear()</script><link href="bundles/bundle-811abcbd.css" rel="stylesheet"><script src="bundles/bundle-8fe1ca85.js"></script></head><body><ul id="slide-out" class="sidenav"><div class="row"><ul class="tabs" id="engineTabs"><li class="tab col s6 tooltipped" data-position="bottom" data-delay="500" data-tooltip="Bedeutsam weniger sicher" tabindex="0"><a onclick='setMode("old")' href="#old" id="old"><i class="material-icons">warning</i> Legacy Modus <i class="material-icons">warning</i></a></li><li class="tab col s6"><a onclick='setMode("new")' href="#new">Vorgeschlagener Modus</a></li></ul></div><div id="options"><div class="input-field" id="theme-container"><select id="theme" onchange="changeTheme(this.value)" class="browser-default"></select> <label>Theme</label></div><div class="input-field" id="lang-container"><select id="lang" onchange="changeLang(this.selectedOptions[0].dataset.short)" class="browser-default"></select> <label>Sprache</label></div><div class="input-field" id="session-container"><label for="session">Erinnere mein Passwort</label><div class="switch" id="session" onclick="sessionToggle()"><label>Aus <input type="checkbox" id="session-toggle"> <span class="lever"></span> An</label></div></div><div id="footer"><a class="btn waves-effect waves-light" onclick="installPromptEvent.prompt()" id="install">Als native App installieren <i class="material-icons" id="install-icon">add_to_home_screen</i> </a><i class="material-icons" id="close" onclick="side.close()">close</i></div></div></ul><div id="settings"><a href="#" data-target="slide-out" class="sidenav-trigger"><i class="material-icons">settings</i></a></div><div id="box"><div id="back" role="main"><div class="input-field"><label for="app">Applikation</label> <input id="app" type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" oninput="appInput(event)" onkeydown="appDown(event)"><div id="logoContainer" class="input-group-addon suffix"><img id="logo" draggable="false"></div></div><div class="input-field"><label for="pass">Master Passwort</label> <input id="pass" type="password" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" onkeyup="passwordUp()"></div><div class="switch" onclick="passwordToggle()"><label>Zeigen <input type="checkbox" id="passwordToggle" checked="checked"> <span class="lever" id="passTogglelever"></span> Verstecken</label></div><div class="input-field"><label for="length">Länge des Passworts</label> <input id="length" type="number" step="1" min="4" value="16" max="512" oninput="process()" onkeypress="return event.charCode>=48&&event.charCode<=57"></div><span class="hint">Desto länger, desto besser</span> <input id="result" type="password" placeholder="Kein Passwort :)" readonly="readonly"><div class="switch" id="resultSwitch" onclick="resultToggle()"><label>Zeigen <input type="checkbox" id="resultToggle" checked="checked"> <span class="lever" id="resultTogglelever"></span> Verstecken</label></div><button id="copy" class="waves-effect waves-light btn" onclick="copy()">Passwort kopieren</button><div class="cf"><a href="faq" id="faq" title="Frequently Asked Questions - Cloverleaf">Hilfe und FAQs</a></div></div></div><a href="https://github.com/cloverleaf/web" class="github-corner" aria-label="Quelle auf GitHub anzeigen" title="Quelle auf GitHub anzeigen" tabindex="-1"><svg width="5em" height="5em" viewBox="0 0 250 250" aria-hidden="true" tabindex="0"><defs><mask id="octomask"><path fill="white" d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path fill="black" d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="black" class="octo-body"></path></mask></defs><rect class="filler" width="100%" height="100%" mask="url(#octomask)"></rect></svg></a><noscript><div id="jsBanner"><a href="https://www.enable-javascript.com/?ref=Cloverleaf" target="_blank">Diese Webseite braucht js um zu funktionieren.</a></div></noscript><script>navigator.serviceWorker.controller?console.log("Active service worker found, no need to register"):navigator.serviceWorker.register("sw.js",{scope:"./"}).then((function(e){console.log("Service worker has been registered for scope:"+e.scope)}))</script></body></html>
<!DOCTYPE html><html lang="de-DE"><head><meta charset="utf-8"><title>Cloverleaf</title><meta name="viewport" content="minimum-scale=1,initial-scale=1"><meta name="description" content="Cloverleaf ist eine gratis, Open-Source App um deinen Passwortmanager zu ersetzen ohne deine Passwörter irgendwo zu speichern."><meta name="robots" content="index, nofollow"><meta name="author" content="ChildishGiant"><meta name="keywords" content="password manager, password generator, security, open source, cloverleaf, perdola, cloverleaf app, cloverleaf.app"><link rel="alternate" href="https://cloverleaf.app/" hreflang="en"><meta name="msvalidate.01" content="22AEF740B887329DA98B4F687396B7C1"><meta name="mobile-web-app-capable" content="yes"><meta property="og:description" content="Cloverleaf ist eine gratis, Open-Source App um deinen Passwortmanager zu ersetzen ohne deine Passwörter irgendwo zu speichern."><meta property="og:title" content="Cloverleaf"><meta property="og:type" content="website"><meta property="og:url" content="https://cloverleaf.app"><meta property="og:image" content="https://cloverleaf.app/android-chrome-512x512.png"><meta property="og:image:secure_url" content="https://cloverleaf.app/android-chrome-512x512.png"><meta property="og:image:width" content="512"><meta property="og:image:height" content="512"><meta property="og:locale" content="en_GB"><meta name="twitter:card" content="summary"><meta name="twitter:creator" content="@ChildishGiant"><meta name="twitter:creator:id" content="871150969417084928"><meta name="twitter:title" content="Cloverleaf"><meta name="twitter:description" content="Cloverleaf ist eine gratis, Open-Source App um deinen Passwortmanager zu ersetzen ohne deine Passwörter irgendwo zu speichern."><meta name="twitter:image" content="https://cloverleaf.app/android-chrome-512x512.png"><link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png"><link rel="manifest" href="manifest.json"><link rel="mask-icon" href="safari-pinned-tab.svg" color="#8c97ce"><link rel="shortcut icon" href="favicon.ico"><meta name="apple-mobile-web-app-title" content="Cloverleaf"><meta name="application-name" content="Cloverleaf"><meta name="msapplication-TileColor" content="#8c97ce"><meta name="theme-color" content="#ffffff"><script>console.clear()</script><link href="bundles/bundle-811abcbd.css" rel="stylesheet" integrity="sha256-kRB5qzAu96pupiCuZhvhe7zVJEaycoPKB6RJ22kKYLc=" crossorigin="anonymous"><script src="bundles/bundle-fa4c3f20.js" integrity="sha256-mOrU73HschY/I1ueOkPtF9uGO8bpjxlt7i2pvhs0GOE=" crossorigin="anonymous"></script></head><body><ul id="slide-out" class="sidenav"><div class="row"><ul class="tabs" id="engineTabs"><li class="tab col s6 tooltipped" data-position="bottom" data-delay="500" data-tooltip="Bedeutsam weniger sicher" tabindex="0"><a onclick='setMode("old")' href="#old" id="old"><i class="material-icons">warning</i> Legacy Modus <i class="material-icons">warning</i></a></li><li class="tab col s6"><a onclick='setMode("new")' href="#new">Vorgeschlagener Modus</a></li></ul></div><div id="options"><div class="input-field" id="theme-container"><select id="theme" onchange="changeTheme(this.value)" class="browser-default"></select> <label>Theme</label></div><div class="input-field" id="lang-container"><select id="lang" onchange="changeLang(this.selectedOptions[0].dataset.short)" class="browser-default"></select> <label>Sprache</label></div><div class="input-field" id="session-container"><label for="session">Erinnere mein Passwort</label><div class="switch" id="session" onclick="sessionToggle()"><label>Aus <input type="checkbox" id="session-toggle"> <span class="lever"></span> An</label></div></div><div id="footer"><a class="btn waves-effect waves-light" onclick="installPromptEvent.prompt()" id="install">Als native App installieren <i class="material-icons" id="install-icon">add_to_home_screen</i> </a><i class="material-icons" id="close" onclick="side.close()">close</i></div></div></ul><div id="settings"><a href="#" data-target="slide-out" class="sidenav-trigger"><i class="material-icons">settings</i></a></div><div id="box"><div id="back" role="main"><div class="input-field"><label for="app">Applikation</label> <input id="app" type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" oninput="appInput(event)" onkeydown="appDown(event)"><div id="logoContainer" class="input-group-addon suffix"><img id="logo" draggable="false"></div></div><div class="input-field"><label for="pass">Master Passwort</label> <input id="pass" type="password" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" onkeyup="passwordUp()"></div><div class="switch" onclick="passwordToggle()"><label>Zeigen <input type="checkbox" id="passwordToggle" checked="checked"> <span class="lever" id="passTogglelever"></span> Verstecken</label></div><div class="input-field"><label for="length">Länge des Passworts</label> <input id="length" type="number" step="1" min="4" value="16" max="512" oninput="process()" onkeypress="return event.charCode>=48&&event.charCode<=57"></div><span class="hint">Desto länger, desto besser</span> <input id="result" type="password" placeholder="Kein Passwort :)" readonly="readonly"><div class="switch" id="resultSwitch" onclick="resultToggle()"><label>Zeigen <input type="checkbox" id="resultToggle" checked="checked"> <span class="lever" id="resultTogglelever"></span> Verstecken</label></div><button id="copy" class="waves-effect waves-light btn" onclick="copy()">Passwort kopieren</button><div class="cf"><a href="faq" id="faq" title="Frequently Asked Questions - Cloverleaf">Hilfe und FAQs</a></div></div></div><a href="https://github.com/cloverleaf/web" class="github-corner" aria-label="Quelle auf GitHub anzeigen" title="Quelle auf GitHub anzeigen" tabindex="-1"><svg width="5em" height="5em" viewBox="0 0 250 250" aria-hidden="true" tabindex="0"><defs><mask id="octomask"><path fill="white" d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path fill="black" d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="black" class="octo-body"></path></mask></defs><rect class="filler" width="100%" height="100%" mask="url(#octomask)"></rect></svg></a><noscript><div id="jsBanner"><a href="https://www.enable-javascript.com/?ref=Cloverleaf" target="_blank">Diese Webseite braucht js um zu funktionieren.</a></div></noscript><script>navigator.serviceWorker.controller?console.log("Active service worker found, no need to register"):navigator.serviceWorker.register("sw.js",{scope:"./"}).then((function(e){console.log("Service worker has been registered for scope:"+e.scope)}))</script></body></html>
Loading

0 comments on commit 26f5c3b

Please sign in to comment.