mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-19 16:49:34 +00:00
Use requestSubmit() in form cleanup controller to avoid CSFR issues
See #1191
This commit is contained in:
parent
131023da67
commit
09cc2ba8ff
2 changed files with 4 additions and 3 deletions
|
|
@ -62,6 +62,6 @@ export default class extends Controller {
|
|||
element.disabled = true;
|
||||
}
|
||||
|
||||
form.submit();
|
||||
form.requestSubmit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,6 +198,7 @@ class WebauthnTFA {
|
|||
{
|
||||
const resultField = document.getElementById('_auth_code');
|
||||
resultField.value = JSON.stringify(data)
|
||||
//requestSubmit() do not work here, probably because the submit is considered invalid. But as we do not use CSFR tokens, it should be fine.
|
||||
form.submit();
|
||||
}
|
||||
|
||||
|
|
@ -232,4 +233,4 @@ class WebauthnTFA {
|
|||
}
|
||||
}
|
||||
|
||||
window.webauthnTFA = new WebauthnTFA();
|
||||
window.webauthnTFA = new WebauthnTFA();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue