Skip to content

Commit 45d1366

Browse files
authored
Fix: renaming files failed on nonce check for local storage driver (#330)
It calculated the nonce of the new page, rather than the old. Which is not the intention, as we want to know if the original page was altered in any way.
1 parent 607dc7a commit 45d1366

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

truewiki/web_routes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ async def edit_page_post(request):
208208
filename = os.path.basename(new_page)
209209
path = os.path.normpath(os.path.dirname(new_page))
210210
new_page = f"{path}/{filename}"
211-
source_edit_nonce = singleton.STORAGE.get_file_nonce(WikiPage.page_ondisk_name(new_page))
211+
source_edit_nonce = singleton.STORAGE.get_file_nonce(WikiPage.page_ondisk_name(page))
212212

213213
if "save" in payload:
214214
if user_edit_nonce != source_edit_nonce:

0 commit comments

Comments
 (0)