Plugin Directory

login-security-solution

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#1548 closed defect (fixed)

Invalid DB table prefix used on multisite installation

Reported by: deanmarktaylor's profile deanmarktaylor's profile deanmarktaylor Owned by: convissor's profile convissor's profile convissor
Priority: high Severity: critical
Plugin: login-security-solution Keywords: multisite, db, table, prefix
Cc: deanmarktaylor

Description

An invalid DB table prefix used on multisite installation causing no rows to be added to the "fails" wp_login_security_solution_fail table.

This has a knock on effect of an email being sent for each failed login, something like:

There have been at least 0 failed attempts to log in during the past 120 minutes that used

Example of which is referenced in this support thread.

Attachments (2)

2012070501 - login-security-solution - 0.13.0 modifications.zip (52.3 KB) - added by deanmarktaylor 14 years ago.
Rollup: Fixed multisite db prefix bug, PHP errors and PHPDoc errors
login-security-solution.2012070501.diff (14.1 KB) - added by deanmarktaylor 14 years ago.
Diff: Fixed multisite db prefix bug, PHP errors and PHPDoc errors

Download all attachments as: .zip

Change History (7)

@deanmarktaylor
14 years ago

Rollup: Fixed multisite db prefix bug, PHP errors and PHPDoc errors

#1 @deanmarktaylor
14 years ago

I have attached a zip containing the following changes:

  • Fixed multisite bug in database table prefix.
  • Fixed multiple php errors / warnings for variable scope and definition.
  • Fixed multiple PHPDoc comments.

Note that this does not contain two files:

  • LoginFailTest::test_process_login_fail__post_threshold
  • LoginFailTest::test_wp_login__post_breach_threshold

This is due to these files having invalid filenames on Windows systems, file names should not contain ":" (colons). This should perhaps reported as a separate bug.

@deanmarktaylor
14 years ago

Diff: Fixed multisite db prefix bug, PHP errors and PHPDoc errors

#2 @deanmarktaylor
14 years ago

Now attached diff for easy reference of changes.

#3 @convissor
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Hi Dean:

Thank you very much for tracking this bug down. The fix has been implemented in commit #567820 and put in release 0.14.0.

And thanks for catching the docblock problems, fixed in commit #567817 and commit #567818.

For future reference, each type of change should have a separate patch file. This makes it way easier to determine what is being changed. When supplying patches, make sure not to change other parts of the code (like removing $sleep = 0 [which is needed] and changing return into return null [which are synonymous]).

#4 @deanmarktaylor
14 years ago

Hi Daniel,

Thanks for updating the project and completing a new release with the changes.

I have created a separate ticket to follow up regarding $sleep = 0 - ticket #1549

And the return vs return null is a coding standards thing for me, if there is a PHPDoc block that specifies a return value, then the function should return one even if it's explicitly null.
This is based in IDE's like this one: http://blog.jetbrains.com/webide/2011/05/phpdoc-inspections/

Other changes might have included my deleting of @return void from docblocks, this is for PHPDoc validation as well (which helped me find the other errors). Also you can see this answer regarding this.

Cheers for all your great work!

#5 @deanmarktaylor
14 years ago

Ticket #1552 has been created to follow up on the invalid file names mentioned in this bug.

Note: See TracTickets for help on using tickets.