This commit is contained in:
@@ -17,6 +17,7 @@ if (!isset($_SESSION["logged_in"]) || $_SESSION["logged_in"] !== true) {
|
||||
<!-- Bootstrap CSS -->
|
||||
<?php
|
||||
include "../assets/components.php";
|
||||
print_csrf_script();
|
||||
?>
|
||||
<script src="https://cdn.rawgit.com/davidshimjs/qrcodejs/gh-pages/qrcode.min.js"></script>
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <!-- Google Material Icons -->
|
||||
@@ -259,7 +260,8 @@ if (!isset($_SESSION["logged_in"]) || $_SESSION["logged_in"] !== true) {
|
||||
fetch('/api/account/update_user_data.php', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRF-Token': window.csrfToken
|
||||
},
|
||||
body: JSON.stringify(updatedUser)
|
||||
})
|
||||
@@ -306,7 +308,8 @@ if (!isset($_SESSION["logged_in"]) || $_SESSION["logged_in"] !== true) {
|
||||
fetch('/api/account/update_pw.php', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRF-Token': window.csrfToken
|
||||
},
|
||||
body: JSON.stringify(passwordData)
|
||||
})
|
||||
@@ -346,6 +349,7 @@ if (!isset($_SESSION["logged_in"]) || $_SESSION["logged_in"] !== true) {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRF-Token': window.csrfToken,
|
||||
},
|
||||
body: JSON.stringify({
|
||||
enable_2fa: isEnabled, // Send the new state of 2FA
|
||||
@@ -384,6 +388,7 @@ if (!isset($_SESSION["logged_in"]) || $_SESSION["logged_in"] !== true) {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-CSRF-Token': window.csrfToken,
|
||||
},
|
||||
body: JSON.stringify({
|
||||
enable_message: isEnabled, // Send the new state of 2FA
|
||||
@@ -476,6 +481,9 @@ function generate2FAQRCode(issuer, accountName, secret) {
|
||||
rep = await window.fetch('/api/account/update_passkey.php?fn=processCreate' + getGetParams(), {
|
||||
//rep = await window.fetch('/test/server.php?fn=processCreate' + getGetParams(), {
|
||||
method : 'POST',
|
||||
headers : {
|
||||
'X-CSRF-Token': window.csrfToken
|
||||
},
|
||||
body : JSON.stringify(authenticatorAttestationResponse),
|
||||
cache : 'no-cache'
|
||||
});
|
||||
@@ -620,7 +628,12 @@ function generate2FAQRCode(issuer, accountName, secret) {
|
||||
}
|
||||
}
|
||||
function delete_all_logmein(){
|
||||
fetch("/api/login/delete_keepmeloggedin.php");
|
||||
fetch("/api/login/delete_keepmeloggedin.php", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"X-CSRF-Token": window.csrfToken
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user