mirror of
https://github.com/zadam/trilium.git
synced 2025-10-30 18:05:55 +01:00
added CSRF protection using csurf express middleware, fixes #455
This commit is contained in:
@@ -98,7 +98,8 @@ $(document).on("click", "button[data-help-page]", e => {
|
||||
$("#logout-button").toggle(!utils.isElectron());
|
||||
|
||||
$("#logout-button").click(() => {
|
||||
const $logoutForm = $('<form action="logout" method="POST">');
|
||||
const $logoutForm = $('<form action="logout" method="POST">')
|
||||
.append($(`<input type="hidden" name="_csrf" value="${glob.csrfToken}"/>`));
|
||||
|
||||
$("body").append($logoutForm);
|
||||
$logoutForm.submit();
|
||||
|
||||
Reference in New Issue
Block a user