From c9c9aec9dd886bea1b78a291fc92fd8052615666 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Mon, 3 Nov 2014 15:56:46 -0500 Subject: [PATCH 01/10] Sync mpw-js to js.masterpasswordapp.com. --- Site/mpw-js/sync | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 Site/mpw-js/sync diff --git a/Site/mpw-js/sync b/Site/mpw-js/sync new file mode 100755 index 00000000..e46b9a88 --- /dev/null +++ b/Site/mpw-js/sync @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -e + +cd "${BASH_SOURCE[0]%/*}" +#s3cmd sync --exclude '.git/**' --delete-removed --follow-symlinks --preserve --acl-public --reduced-redundancy . s3://js.masterpasswordapp.com/ +rsync -avP --no-group . satura.lyndir.com:/usr/local/www/js.masterpasswordapp.com/htdocs-secure/ From 96b482d94b8359c92e5de5581c473c14a3e2b2e2 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Mon, 3 Nov 2014 16:04:41 -0500 Subject: [PATCH 02/10] KCOrderedAccessorFix was forked. --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 38e1a97e..2d5117c1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,7 +6,7 @@ url = git://github.com/lhunath/InAppSettingsKit.git [submodule "External/KCOrderedAccessorFix"] path = External/KCOrderedAccessorFix - url = https://github.com/CFKevinRef/KCOrderedAccessorFix.git + url = https://github.com/lhunath/KCOrderedAccessorFix.git [submodule "External/AttributedMarkdown"] path = External/AttributedMarkdown url = https://github.com/dreamwieber/AttributedMarkdown.git From 435d72a5093354057720563011fc4fa845db6203 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Mon, 10 Nov 2014 12:35:31 -0500 Subject: [PATCH 03/10] Read the user's name and site name from stdin if not given. --- MasterPassword/C/mpw.c | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/MasterPassword/C/mpw.c b/MasterPassword/C/mpw.c index 13994a09..ea286d12 100644 --- a/MasterPassword/C/mpw.c +++ b/MasterPassword/C/mpw.c @@ -95,13 +95,24 @@ char *homedir(const char *filename) { return homefile; } +char *getlinep(const char *prompt) { + char *buf = NULL; + size_t bufSize = 0; + ssize_t lineSize; + fprintf(stderr, "%s", prompt); + fprintf(stderr, " "); + if ((lineSize = getline(&buf, &bufSize, stdin)) < 0) { + free(buf); + return NULL; + } + buf[lineSize - 1]=0; + return buf; +} + int main(int argc, char *const argv[]) { - if (argc < 2) - usage(); - // Read the environment. - const char *userName = getenv( MP_env_username ); + char *userName = getenv( MP_env_username ); const char *masterPassword = NULL; const char *siteName = NULL; MPElementType siteType = MPElementTypeGeneratedLong; @@ -156,13 +167,17 @@ int main(int argc, char *const argv[]) { // Convert and validate input. if (!userName) { - fprintf(stderr, "Missing user name.\n"); - return 1; + if (!(userName = getlinep("Your user name:"))) { + fprintf(stderr, "Missing user name.\n"); + return 1; + } } trc("userName: %s\n", userName); if (!siteName) { - fprintf(stderr, "Missing site name.\n"); - return 1; + if (!(siteName = getlinep("Site name:"))) { + fprintf(stderr, "Missing site name.\n"); + return 1; + } } trc("siteName: %s\n", siteName); if (siteCounterString) From f0fa350e64e5e29cceb3bdffdd197d4038783e6e Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Mon, 10 Nov 2014 16:44:37 -0500 Subject: [PATCH 04/10] Fix mixed content and bad path for setImmediate-polyfill. --- Site/mpw-js/css/main.css | 2 +- Site/mpw-js/js/dependencies.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Site/mpw-js/css/main.css b/Site/mpw-js/css/main.css index ed0a108f..336855b9 100644 --- a/Site/mpw-js/css/main.css +++ b/Site/mpw-js/css/main.css @@ -1,4 +1,4 @@ -@import url(http://fonts.googleapis.com/css?family=Flamenco:300|Exo+2:400,100,900); +@import url(://fonts.googleapis.com/css?family=Flamenco:300|Exo+2:400,100,900); /**** BASE STYLE ****/ html { diff --git a/Site/mpw-js/js/dependencies.js b/Site/mpw-js/js/dependencies.js index 0d54f51c..ebd155ea 100644 --- a/Site/mpw-js/js/dependencies.js +++ b/Site/mpw-js/js/dependencies.js @@ -37,7 +37,7 @@ try { ES6 || document.write("