mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-20 17:19: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;
|
element.disabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
form.submit();
|
form.requestSubmit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -198,6 +198,7 @@ class WebauthnTFA {
|
||||||
{
|
{
|
||||||
const resultField = document.getElementById('_auth_code');
|
const resultField = document.getElementById('_auth_code');
|
||||||
resultField.value = JSON.stringify(data)
|
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();
|
form.submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue