From d304533ccaf91237e3539de923bbcb07b6253d3e Mon Sep 17 00:00:00 2001 From: Timothy Prepscius Date: Sun, 29 Sep 2013 15:12:15 -0400 Subject: [PATCH] makes the captcha keys optional --- build/compile-web-js | 2 ++ deploy/tomcat/resources/captcha_private_key | 2 +- .../recaptcha/private.key | 0 keys/recaptcha/public.key | 1 + web/common/mEmbeddedResources.js | 5 ++++- web/signup/SignUp.html | 16 ++++++++-------- web/signup/mSignUp.js | 9 ++++++++- 7 files changed, 24 insertions(+), 11 deletions(-) rename passwords/captcha_private_key => keys/recaptcha/private.key (100%) create mode 100644 keys/recaptcha/public.key diff --git a/build/compile-web-js b/build/compile-web-js index 8068053..e35d5d9 100755 --- a/build/compile-web-js +++ b/build/compile-web-js @@ -8,6 +8,7 @@ HOST_PRIMARY=`cat ../config/hosts/$M` HOST_AUTH=`cat ../config/hosts/auth_$M` HOST_TOMCAT=`cat ../config/hosts/tomcat_$M` HOST_WEB=`cat ../config/hosts/web_$M` +RECAPTCHA_PUBLIC_KEY=`cat ../keys/recaptcha/public.key` function replaceStrings() { sed -i '' -f replace_js_$M.sed $1 @@ -18,6 +19,7 @@ function replaceStrings() { sed -i '' -e s/{##HOST_AUTH##}/$HOST_AUTH/g $1 sed -i '' -e s/{##HOST_TOMCAT##}/$HOST_TOMCAT/g $1 sed -i '' -e s/{##HOST_WEB##}/$HOST_WEB/g $1 + sed -i '' -e s/{##RECAPTCHA_PUBLIC_KEY##}/$RECAPTCHA_PUBLIC_KEY/g $1 } echo Replacing Strings diff --git a/deploy/tomcat/resources/captcha_private_key b/deploy/tomcat/resources/captcha_private_key index 948d898..292d608 120000 --- a/deploy/tomcat/resources/captcha_private_key +++ b/deploy/tomcat/resources/captcha_private_key @@ -1 +1 @@ -../../../passwords/captcha_private_key \ No newline at end of file +../../../keys/recaptcha/private.key \ No newline at end of file diff --git a/passwords/captcha_private_key b/keys/recaptcha/private.key similarity index 100% rename from passwords/captcha_private_key rename to keys/recaptcha/private.key diff --git a/keys/recaptcha/public.key b/keys/recaptcha/public.key new file mode 100644 index 0000000..7a2d820 --- /dev/null +++ b/keys/recaptcha/public.key @@ -0,0 +1 @@ +NONE diff --git a/web/common/mEmbeddedResources.js b/web/common/mEmbeddedResources.js index 13181a6..68bc8fc 100644 --- a/web/common/mEmbeddedResources.js +++ b/web/common/mEmbeddedResources.js @@ -5,7 +5,10 @@ EmbeddedResources = { "{##TRUSTSTORE_AUTH##}", "mail.client.Mailer.send-truststore.jks.b64" : - "{##TRUSTSTORE_SEND##}" + "{##TRUSTSTORE_SEND##}", + + "mail.signup.SignUp.recaptcha-public-key" : + "{##RECAPTCHA_PUBLIC_KEY##}" }; /** resources **/ diff --git a/web/signup/SignUp.html b/web/signup/SignUp.html index 32b4da1..2d74f5e 100644 --- a/web/signup/SignUp.html +++ b/web/signup/SignUp.html @@ -145,7 +145,7 @@