[ 
https://issues.apache.org/jira/browse/JSPWIKI-851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18134124#comment-18134124
 ] 

Arturo Bernal commented on JSPWIKI-851:
---------------------------------------

Reproduced with the current code (master plus an unrelated parser change, 
Tomcat 10.1, Chrome, plain editor). I typed a text in the editor, removed the 
hidden hash field from the form, which is what a missing or changed hash looks 
like to SpamFilter.checkHash, and pressed Save. The browser went to 
Wiki.jsp?page=SessionExpired, which says This page does not exist. Why don't 
you go and create it?, as in the report. There is no SessionExpired page in the 
repository, in the initial pages of any language.

The text is lost: the page was not saved on the server, and the draft that the 
editor keeps in the local storage of the browser was removed. The submit 
handler in Wiki.Edit.js (onbeforeunload function) removes the draft when the 
form is sent, before the server has accepted it, so the dialog to restore an 
unsaved version does not appear when the editor is opened again. Before 
pressing Save the draft held the typed text.

Limits: I simulated the missing hash by removing the field, I did not wait for 
a real session expiry or for the hash name to change after 24 hours; only 
Chrome and the plain editor were tried. Two changes look possible, a 
SessionExpired page in the initial pages, and keeping the draft until the page 
has been saved; I have not tried either. Leaving the issue open.

> Session Expired Behaviour
> -------------------------
>
>                 Key: JSPWIKI-851
>                 URL: https://issues.apache.org/jira/browse/JSPWIKI-851
>             Project: JSPWiki
>          Issue Type: Bug
>          Components: Core & storage
>    Affects Versions: 2.10.1
>            Reporter: Jürgen Weber
>            Priority: Major
>




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to