? Success

User tests: Successful: Unsuccessful:

avatar maxvalentini77
maxvalentini77
15 May 2015

Zero or negative values on session lifetime

Session lifetime is an integer value and should be setted to a positive value greater than zero.

  • Negative value cause that the session to be always "expired".
  • Zero behavior is equals to the default value of 15 minute, this behavior is not explict and can be obtained setting 15 minutes of lifetime, so i remove zero from the valid range.
avatar maxvalentini77 maxvalentini77 - open - 15 May 2015
avatar zero-24 zero-24 - change - 15 May 2015
Status New Pending
Easy No Yes
avatar zero-24 zero-24 - change - 15 May 2015
Category Administration
avatar zero-24
zero-24 - comment - 15 May 2015

How to test

  • try to insert and save a value of zero as session time
  • make sure no issues are reported
  • apply the patch
  • try zero again
  • repeat the test with 1 and 2 as values (both should work)

Thanks @maxvalentini77


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6954.

avatar zero-24 zero-24 - change - 15 May 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 15 May 2015
Labels Added: ?
avatar Fedik
Fedik - comment - 16 May 2015

I still able to save negative value:
screen 2015-05-16 13 46 52 492x135

avatar Fedik
Fedik - comment - 16 May 2015

I think problem that there no backend validation for this input,
also filter="integer" allow negative value (that is valid),
min="1" have not much effect at least in my Chrome browser :smile:

same problem with "Cache Time" in same configuration form

avatar izharaazmi
izharaazmi - comment - 16 May 2015

@maxvalentini77 I suggest to add filter="uint" as well to the field, though I don't see it as necessary.

avatar maxvalentini77
maxvalentini77 - comment - 16 May 2015

@Fedik You are right, I'm working on a server side validation.
@izharaazmi Thanks for the tip!

avatar maxvalentini77
maxvalentini77 - comment - 28 May 2015

Added number validator to check min/max range for number fields.
Added the validator to cachetime and session lifetime, both setted with min of 1.

avatar jonnyefftek jonnyefftek - test_item - 30 May 2015 - Tested successfully
avatar ChrisBreaks ChrisBreaks - test_item - 30 May 2015 - Tested successfully
avatar zero-24 zero-24 - change - 30 May 2015
Status Pending Ready to Commit
avatar zero-24
zero-24 - comment - 30 May 2015

RTC based on testing by @ChrisBreaks and @jonnyefftek on #jab15 #makeithappen


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6954.

avatar zero-24 zero-24 - change - 30 May 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 30 May 2015
Labels Added: ?
avatar watchfulli-dev
watchfulli-dev - comment - 3 Jun 2015

@test test resutls are: without patch applied, there's no error displayed and you can enter 0 inside "Session Lifetime " field. After applying the patch if you try to enter 0 as a value inside "Session Lifetime " field, you get this error: "Invalid field: Session Lifetime"


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6954.

avatar watchfulli-dev watchfulli-dev - test_item - 3 Jun 2015 - Tested successfully
avatar Bakual Bakual - change - 3 Jun 2015
Milestone Added:
avatar Bakual Bakual - change - 3 Jun 2015
Milestone Added:
avatar Bakual Bakual - change - 3 Jun 2015
Milestone Removed:
avatar Bakual Bakual - reference | b649299 - 3 Jun 15
avatar zero-24 zero-24 - close - 3 Jun 2015
avatar Bakual
Bakual - comment - 3 Jun 2015

Merged with b649299 into 3.5-dev.

Thanks!

Is there a list of available JFormRules somewhere? If so that would need updated as we introduce a new one here.

avatar Bakual Bakual - change - 3 Jun 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-06-03 14:11:01
Closed_By Bakual
avatar Bakual Bakual - close - 3 Jun 2015
avatar Bakual Bakual - close - 3 Jun 2015
avatar losedk
losedk - comment - 3 Jun 2015

@Bakual Should the doc block say @since xx.x?

avatar maxvalentini77
maxvalentini77 - comment - 3 Jun 2015

I wrote xx.x in the attribute because i didn't know in which version this class will be introduced. Now should contain 3.5.0, right?

avatar zero-24
zero-24 - comment - 3 Jun 2015

Correct @maxvalentini77 can you just send a quick PR that fixes that?

avatar maxvalentini77
maxvalentini77 - comment - 3 Jun 2015

@zero-24 I create a new PR #7109 it's ok?

avatar Bakual
Bakual - comment - 3 Jun 2015

Awww. I usually don't look at the doc blocks close enough...

avatar zero-24
zero-24 - comment - 3 Jun 2015

@zero-24 I create a new PR #7109 it's ok?

:+1: Thomas allready merged it. Thanks

avatar zero-24 zero-24 - change - 14 Oct 2015
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment