J4 Issue ?
avatar brianteeman
brianteeman
18 Jul 2019

Keep session alive, for example, while editing or creating an article.

So my question is - should this be set on all pages with a form?

If not then what type of form should it be set on?

If you look through the codebase there is no consistency on this. I am happy to spend the time to make it consistent and logical - I just need to understand the when and where

avatar brianteeman brianteeman - open - 18 Jul 2019
avatar joomla-cms-bot joomla-cms-bot - change - 18 Jul 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 18 Jul 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 18 Jul 2019
Labels Added: J4 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 18 Jul 2019
avatar mbabker
mbabker - comment - 18 Jul 2019

I'd go with a guideline of if a form gets submitted through POST then it should in most cases have keepalive since that form should have a CSRF check behind it (forms like a create item form, edit form, login form, contact form, etc.), and if it gets submitted through GET it doesn't need a keepalive behavior because these types of forms should essentially be nothing more than query filters for a page. I say this also realizing the backend views are in kind of a FUBAR state because the search filters trigger a POST form submission, and it looks like the frontend com_content.archive view has the same "issue" which means Joomla isn't always using the appropriate HTTP action to do things sadly.

avatar brianteeman
brianteeman - comment - 18 Jul 2019

Thanks - I can work with that. I assume therefore that any form with keepalive must have the csrf check as well.

avatar brianteeman
brianteeman - comment - 18 Jul 2019

partial PR in #25638

avatar wilsonge
wilsonge - comment - 18 Jul 2019

It's not an implicit thing. All keepalive does is keep the session alive. However yeah basically all our forms should have a csrf check to try and stop request forgeries as a rule of thumb (can't think of any exceptions in core)

avatar franz-wohlkoenig franz-wohlkoenig - change - 19 Jul 2019
Status New Discussion
avatar brianteeman brianteeman - change - 13 Dec 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-12-13 19:19:14
Closed_By brianteeman
avatar brianteeman brianteeman - close - 13 Dec 2019
avatar brianteeman brianteeman - change - 28 Jan 2020
Status Closed New
Closed_Date 2019-12-13 19:19:14
Closed_By brianteeman
avatar brianteeman brianteeman - reopen - 28 Jan 2020
avatar brianteeman
brianteeman - comment - 28 Jan 2020

re-opening so it can be checked further after todays release

avatar brianteeman
brianteeman - comment - 10 Apr 2020

So to confirm
every time we have a <form action we should also have a form.token
Because we dont

avatar brianteeman brianteeman - change - 10 Apr 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-04-10 23:37:36
Closed_By brianteeman
avatar brianteeman brianteeman - close - 10 Apr 2020

Add a Comment

Login with GitHub to post a comment