From 03eabe84f5b53092eea97ad20e22a11638efd7e9 Mon Sep 17 00:00:00 2001
From: Brayden Thomas
Date: Wed, 17 Jul 2019 03:27:15 +0000
Subject: [PATCH 1/9] Fix 2FA Password character limit
---
dappur/js/2fa.js | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dappur/js/2fa.js b/dappur/js/2fa.js
index 8036147..80ca796 100644
--- a/dappur/js/2fa.js
+++ b/dappur/js/2fa.js
@@ -12,7 +12,6 @@ $(document).on('change', '#2fa', function(){
text: "Please enter your current password to continue. If you do not know your current password, logout and click 'Forgot Password' on the login page.",
input: 'password',
inputAttributes: {
- 'maxlength': 10,
'autocapitalize': 'off',
'autocorrect': 'off'
},
@@ -99,4 +98,4 @@ $(document).on('change', '#2fa', function(){
$('#2fa-toggle').html('');
$('#2fa').bootstrapToggle();
}).catch(swal.noop);
-});
\ No newline at end of file
+});
From 6ba0c7a987e81bdde72d9a587e4846f59fcd07e4 Mon Sep 17 00:00:00 2001
From: Brayden Thomas
Date: Wed, 17 Jul 2019 03:27:38 +0000
Subject: [PATCH 2/9] Fix 2FA Password character limit
---
dappur/js/2fa.min.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dappur/js/2fa.min.js b/dappur/js/2fa.min.js
index 7aec86d..2ed0f82 100644
--- a/dappur/js/2fa.min.js
+++ b/dappur/js/2fa.min.js
@@ -1 +1 @@
-$(document).on("change","#2fa",function(){var n=$(this).prop("checked");if(n)var a="Enable Two Factor Auth",r=!0;else a="Disable Two Factor Auth",r=!1;swal({title:a,text:"Please enter your current password to continue. If you do not know your current password, logout and click 'Forgot Password' on the login page.",input:"password",inputAttributes:{maxlength:10,autocapitalize:"off",autocorrect:"off"},showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Continue",cancelButtonText:"Cancel",confirmButtonClass:"btn btn-success",cancelButtonClass:"btn btn-danger",buttonsStyling:!0,reverseButtons:!0,preConfirm:function(t){return new Promise(function(e,o){DappurCSRF.csrfAjax("/profile/2fa",{password:t,status2fa:r},function(t){if(parsed=jQuery.parseJSON(t),"error"==parsed.result){o("Your current password doesn't match. If you do not know your current password, logout and click 'Forgot Password' on the login page.")}else"success"==parsed.result?swal({title:a,html:'Please scan the following QR code or enter the secret into your authenticator app and enter the response to enable two factor authentication. Secret: '+parsed.secret+'
',showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Continue",cancelButtonText:"Cancel",confirmButtonClass:"btn btn-success",cancelButtonClass:"btn btn-danger",buttonsStyling:!0,reverseButtons:!0,preConfirm:function(){return new Promise(function(e,o){var t=$("#swal-input1").val();DappurCSRF.csrfAjax("/profile/2fa/validate",{code:t},function(t){parsed=jQuery.parseJSON(t),"error"==parsed.result?o("Code incorrect, please try again."):"success"==parsed.result?e():o("An unknown error occured.")})})}}).then(function(){swal({type:"success",title:"Two factor authentication has been successfully set up on your account."})},function(t){var e="checked";if(n)e="";$("#2fa-toggle").html(''),$("#2fa").bootstrapToggle()}).catch(swal.noop):"disabled"==parsed.result&&e()})})},allowOutsideClick:!1}).then(function(){},function(t){var e="checked";if(n)e="";$("#2fa-toggle").html(''),$("#2fa").bootstrapToggle()}).catch(swal.noop)});
\ No newline at end of file
+$(document).on("change","#2fa",function(){var n=$(this).prop("checked");if(n)var a="Enable Two Factor Auth",r=!0;else a="Disable Two Factor Auth",r=!1;swal({title:a,text:"Please enter your current password to continue. If you do not know your current password, logout and click 'Forgot Password' on the login page.",input:"password",inputAttributes:{autocapitalize:"off",autocorrect:"off"},showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Continue",cancelButtonText:"Cancel",confirmButtonClass:"btn btn-success",cancelButtonClass:"btn btn-danger",buttonsStyling:!0,reverseButtons:!0,preConfirm:function(t){return new Promise(function(e,o){DappurCSRF.csrfAjax("/profile/2fa",{password:t,status2fa:r},function(t){if(parsed=jQuery.parseJSON(t),"error"==parsed.result){o("Your current password doesn't match. If you do not know your current password, logout and click 'Forgot Password' on the login page.")}else"success"==parsed.result?swal({title:a,html:'Please scan the following QR code or enter the secret into your authenticator app and enter the response to enable two factor authentication. Secret: '+parsed.secret+'
',showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Continue",cancelButtonText:"Cancel",confirmButtonClass:"btn btn-success",cancelButtonClass:"btn btn-danger",buttonsStyling:!0,reverseButtons:!0,preConfirm:function(){return new Promise(function(e,o){var t=$("#swal-input1").val();DappurCSRF.csrfAjax("/profile/2fa/validate",{code:t},function(t){parsed=jQuery.parseJSON(t),"error"==parsed.result?o("Code incorrect, please try again."):"success"==parsed.result?e():o("An unknown error occured.")})})}}).then(function(){swal({type:"success",title:"Two factor authentication has been successfully set up on your account."})},function(t){var e="checked";if(n)e="";$("#2fa-toggle").html(''),$("#2fa").bootstrapToggle()}).catch(swal.noop):"disabled"==parsed.result&&e()})})},allowOutsideClick:!1}).then(function(){},function(t){var e="checked";if(n)e="";$("#2fa-toggle").html(''),$("#2fa").bootstrapToggle()}).catch(swal.noop)});
From 4626485b806bd0ed9d79a32e88cbae797162e73e Mon Sep 17 00:00:00 2001
From: Brayden Thomas
Date: Wed, 17 Jul 2019 03:30:08 +0000
Subject: [PATCH 3/9] Fix "Change password" field character limit
---
dappur/js/change-password.js | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dappur/js/change-password.js b/dappur/js/change-password.js
index 51f444b..a8e70da 100644
--- a/dappur/js/change-password.js
+++ b/dappur/js/change-password.js
@@ -4,7 +4,6 @@ $(document).on('click', '.change_password', function(){
text: "Please enter your current password to continue. If you do not know your current password, logout and click 'Forgot Password' on the login page.",
input: 'password',
inputAttributes: {
- 'maxlength': 10,
'autocapitalize': 'off',
'autocorrect': 'off'
},
@@ -84,4 +83,4 @@ $(document).on('click', '.change_password', function(){
})
}).catch(swal.noop);
}).catch(swal.noop);
-});
\ No newline at end of file
+});
From 936c4a51f870b5e848e0f3f0dc0436d27bb085fa Mon Sep 17 00:00:00 2001
From: Brayden Thomas
Date: Wed, 17 Jul 2019 03:30:59 +0000
Subject: [PATCH 4/9] Fix "Change password" field character limit
---
dappur/js/change-password.min.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dappur/js/change-password.min.js b/dappur/js/change-password.min.js
index bb22f7f..85a8adb 100644
--- a/dappur/js/change-password.min.js
+++ b/dappur/js/change-password.min.js
@@ -1 +1 @@
-$(document).on("click",".change_password",function(){swal({title:"Change Password",text:"Please enter your current password to continue. If you do not know your current password, logout and click 'Forgot Password' on the login page.",input:"password",inputAttributes:{maxlength:10,autocapitalize:"off",autocorrect:"off"},showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Continue",cancelButtonText:"Cancel",confirmButtonClass:"btn btn-success",cancelButtonClass:"btn btn-danger",buttonsStyling:!0,preConfirm:function(o){return new Promise(function(n,s){DappurCSRF.csrfAjax("/profile/password-check",{password:o},function(o){if(parsed=jQuery.parseJSON(o),"error"==parsed.result){s("Your current password doesn't match. If you do not know your current password, logout and click 'Forgot Password' on the login page.")}else"success"==parsed.result?n():s("An unknown error occured.")})})},allowOutsideClick:!1}).then(function(o){swal({title:"Change Password",html:'
Please enter your new password.
',focusConfirm:!1,showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Change Password",cancelButtonText:"Cancel",preConfirm:function(){return new Promise(function(o,n){var s=$("#swal-input1").val(),t=$("#swal-input2").val();s!=t&&n("The passwords you entered do not match."),DappurCSRF.csrfAjax("/profile/change-password",{password:s,confirm:t},function(s){parsed=jQuery.parseJSON(s),"error"==parsed.result?n(parsed.message):"success"==parsed.result?o():n("An unknown error occured.")})})}}).then(function(o){swal({type:"success",title:"Your password has been successfully changed."})}).catch(swal.noop)}).catch(swal.noop)});
\ No newline at end of file
+$(document).on("click",".change_password",function(){swal({title:"Change Password",text:"Please enter your current password to continue. If you do not know your current password, logout and click 'Forgot Password' on the login page.",input:"password",inputAttributes:{autocapitalize:"off",autocorrect:"off"},showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Continue",cancelButtonText:"Cancel",confirmButtonClass:"btn btn-success",cancelButtonClass:"btn btn-danger",buttonsStyling:!0,preConfirm:function(o){return new Promise(function(n,s){DappurCSRF.csrfAjax("/profile/password-check",{password:o},function(o){if(parsed=jQuery.parseJSON(o),"error"==parsed.result){s("Your current password doesn't match. If you do not know your current password, logout and click 'Forgot Password' on the login page.")}else"success"==parsed.result?n():s("An unknown error occured.")})})},allowOutsideClick:!1}).then(function(o){swal({title:"Change Password",html:'
Please enter your new password.
',focusConfirm:!1,showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Change Password",cancelButtonText:"Cancel",preConfirm:function(){return new Promise(function(o,n){var s=$("#swal-input1").val(),t=$("#swal-input2").val();s!=t&&n("The passwords you entered do not match."),DappurCSRF.csrfAjax("/profile/change-password",{password:s,confirm:t},function(s){parsed=jQuery.parseJSON(s),"error"==parsed.result?n(parsed.message):"success"==parsed.result?o():n("An unknown error occured.")})})}}).then(function(o){swal({type:"success",title:"Your password has been successfully changed."})}).catch(swal.noop)}).catch(swal.noop)});
From 59d0feb6f78a94c55f174c3c38374578cf7f81a0 Mon Sep 17 00:00:00 2001
From: Brayden Thomas
Date: Wed, 17 Jul 2019 03:33:15 +0000
Subject: [PATCH 5/9] Add conveniance links to contact page
---
dappur/contact.twig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dappur/contact.twig b/dappur/contact.twig
index d6245fe..04e3e73 100644
--- a/dappur/contact.twig
+++ b/dappur/contact.twig
@@ -65,7 +65,7 @@