mirror of
https://github.com/sbrl/Pepperminty-Wiki.git
synced 2024-11-24 17:13:01 +00:00
Return a 409 Conflict instead of a 200 OK on an edit conflict when saving a page in the save action
This commit is contained in:
parent
5b0619b0a2
commit
49a675c042
2 changed files with 2 additions and 0 deletions
|
@ -14,6 +14,7 @@ This file holds the changelog for Pepperminty Wiki. This is the master list of t
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Display returnto URL above the login form if present to further mitigate CSRF issues
|
- Display returnto URL above the login form if present to further mitigate CSRF issues
|
||||||
|
- [Rest API] Return a 409 Conflict instead of a 200 OK on an edit conflict when saving a page in the `save` action
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Stats: Fix crash when loading the stats page
|
- Stats: Fix crash when loading the stats page
|
||||||
|
|
|
@ -503,6 +503,7 @@ DIFFSCRIPT;
|
||||||
page_renderer::add_js_link("$paths->extra_data_directory/page-edit/diff.min.js");
|
page_renderer::add_js_link("$paths->extra_data_directory/page-edit/diff.min.js");
|
||||||
page_renderer::add_js_snippet($diff_script);
|
page_renderer::add_js_snippet($diff_script);
|
||||||
|
|
||||||
|
http_response_code(409);
|
||||||
header("x-failure-reason: edit-conflict");
|
header("x-failure-reason: edit-conflict");
|
||||||
exit(page_renderer::render_main("Edit Conflict - $env->page - $settings->sitename", $content));
|
exit(page_renderer::render_main("Edit Conflict - $env->page - $settings->sitename", $content));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue