Skip to content
This repository was archived by the owner on Oct 31, 2018. It is now read-only.

Conversation

@karakayasemi
Copy link
Contributor

@karakayasemi karakayasemi commented Aug 20, 2017

Brute force settings now configurable.
Sleep is removed, #12
Ip will be blocked after too many failed attempts #11
admin settings style is enhanced #7
Indentation mistakes are fixed #18

@karakayasemi karakayasemi changed the title Throw login exception in preLogin isnstead of sleep Throw login exception in preLogin instead of sleep Aug 20, 2017
@DeepDiver1975
Copy link
Contributor

bildschirmfoto von 2017-08-21 10-22-34

Some styling on the input fields is missing

Copy link

@phil-davis phil-davis left a comment

Choose a reason for hiding this comment

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

Some suggestions for wording of text strings.

OC.AppConfig.setValue('security', 'brute_force_protection_ban_period', banPeriod);
OC.msg.finishedSuccess('#security-save-bfp-settings-message', OC.L10N.translate('Security', 'Preferences are saved'));
} else {
OC.msg.finishedError('#security-save-bfp-settings-message', OC.L10N.translate('Security', 'Inputs are should be positive integer'));

Choose a reason for hiding this comment

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

Inputs must be positive integers

}

/**
* Look failed login attempts in how many seconds?

Choose a reason for hiding this comment

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

Count failed login attempts over how many seconds

}

/**
* How many seconds ban attacker

Choose a reason for hiding this comment

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

How many seconds to ban an attacker

<h2 class="inlineblock"><?php p($l->t('Brute Force Protection')); ?></h2>
<span id="security-save-bfp-settings-message" class="msg"></span>
<div>
<label for="security-bfp-threshold-time"><?php p($l->t('Look failed login attempts in how many seconds?')) ?></label><br>

Choose a reason for hiding this comment

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

Count failed login attempts over how many seconds?

OC.AppConfig.setValue('security', 'brute_force_protection_time_threshold', thresholdTime);
OC.AppConfig.setValue('security', 'brute_force_protection_fail_tolerance', failTolerance);
OC.AppConfig.setValue('security', 'brute_force_protection_ban_period', banPeriod);
OC.msg.finishedSuccess('#security-save-bfp-settings-message', OC.L10N.translate('Security', 'Preferences are saved'));
Copy link
Contributor

Choose a reason for hiding this comment

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

please use t() instead of OC.L10N.translate - only using t() the extraction tool can extract strings - THX

$this->connection = \OC::$server->getDatabaseConnection();
$this->factory = new TimeFactory();
$this->dbService = new DbService($this->connection, $this->factory);
$this->configMock = $this->getMockBuilder('OCA\Security\SecurityConfig')
Copy link
Contributor

Choose a reason for hiding this comment

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

Just comment for the future use:

SecurityConfig::class


->disableOriginalConstructor()
->getMock();
$this->dispatcherMock = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcher')
Copy link
Contributor

Choose a reason for hiding this comment

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

::class - see above

@karakayasemi karakayasemi force-pushed the doesNotUseSleep branch 3 times, most recently from bd6335f to c25fcbd Compare August 21, 2017 09:40
@DeepDiver1975
Copy link
Contributor

Please use rebase instead of merge

  1. git fetch origin -p
  2. git rebase -i origin/master
  3. editor pops up - review commits and adjust if necessary - save and close
  4. resolve conflicts if necessary (basically follow instructions as printed by git)
  5. push branch

@karakayasemi karakayasemi force-pushed the doesNotUseSleep branch 4 times, most recently from 0c43986 to c84016a Compare August 21, 2017 12:00
@karakayasemi
Copy link
Contributor Author

@DeepDiver1975 any obstacle?

@DeepDiver1975 DeepDiver1975 merged commit f99e799 into master Aug 21, 2017
@DeepDiver1975 DeepDiver1975 deleted the doesNotUseSleep branch August 21, 2017 15:06
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.

Fix indentation mistakes according to Coding Style & General Guidelines

5 participants