Skip to content

Conversation

@cornelinux
Copy link
Contributor

@cornelinux cornelinux commented Jun 30, 2017

Description

It reads the timeout for re-checking credentials from the database.

Related Issue

#28252

Motivation and Context

This causes unneccessary load on the LDAP server.
Also, when using one time passwords, the 2nd authentication after 5 minutes will not work anymore!
So we need to set this to lets say 8 hours.

How Has This Been Tested?

It has been manually tested with OC 10.0.2

  1. tested without the DB setting "last_check_timeout". This successfully falls back to 5 minutes.
  2. tested with a DB setting of last_check_timeout=1. This checks passwords every minute.

Screenshots (if appropriate):

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Using last_check_timeout the administrator
can change the 5 minutes period in which
the password of the user is rechecked.

Closes owncloud#28252
$now = $this->timeFacory->getTime();
if ($lastCheck > ($now - 60 * 5)) {
$now = $this->timeFactory->getTime();
$last_check_timeout = intval($this->config->getAppValue('last_check_timeout', 5));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing app name in getAppValue() ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea. I think the app name is contained in the config. This is the way I was told to use it in my other app. It works in the other app and here, too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, obviously you are right!
Very interesting. I will update the pull request.

Copy link
Contributor

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@PVince81 PVince81 merged commit ae1ee16 into owncloud:master Jul 4, 2017
@PVince81
Copy link
Contributor

PVince81 commented Jul 4, 2017

@cornelinux thanks a lot. Please backport to stable10

@cornelinux
Copy link
Contributor Author

So you mean another PR to the branch "stable10"?

@tomneedham
Copy link
Contributor

So you mean another PR to the branch "stable10"?

yes, and then cherry-pick these commits over to it

@cornelinux
Copy link
Contributor Author

thx. Just did it. :-)

@lock
Copy link

lock bot commented Aug 3, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants