I am currently working on a D7 port for a current project - https://github.com/erikwebb/password_policy

It is not a complete port, as we're only porting the needed functionality for this project. Having said that, this is largely a direct port without any liberal modifications.

The work will likely complete by EOY.

Comments

erikwebb’s picture

Status: Needs work » Needs review

This module is in working order and has been deployed to government sites, passing security audits. The tests and other features are not fully implemented, but this should serve as a useful starting point.

hadsie’s picture

Just tested this out, and it's working quite well for me so far. Would be great to see this rolled back into the drupal project.

wiifm’s picture

Have downloaded master today, installed fine, small issue when adding a new password policy, the expiration field is currently mandatory, yet the form indicates it is not.

Submitting a new policy without the expiration left empty reveals

PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'expiration' at row 1: INSERT INTO {password_policy} (name, description, enabled, policy, expiration, warning) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5); Array ( [:db_insert_placeholder_0] => NZ e-govt requirements [:db_insert_placeholder_1] => As per http://www.e.govt.nz/standards/authentication/password-standard/password-minimum-requirements [:db_insert_placeholder_2] => 0 [:db_insert_placeholder_3] => a:3:{s:10:"complexity";s:1:"3";s:6:"length";s:1:"7";s:8:"username";s:1:"1";} [:db_insert_placeholder_4] => [:db_insert_placeholder_5] => ) in password_policy_admin_form_submit() (line 432 of C:\xampp\htdocs-prodcomm\sites\all\modules\contrib\password_policy\password_policy.admin.inc).

So either:
* the form needs to be altered to make this field mandatory
* or default the field to 0 or something to mean 'never expires'

erikwebb’s picture

The field should now be defaulted to '0', both in the form and the database for consistency.

So about merging this copy onto d.o....

slashrsm’s picture

Status: Needs review » Reviewed & tested by the community

I've tested this and works fine on my websites.

slashrsm’s picture

@erikwebb Do you also plan to port password_policy_password_tab?

erikwebb’s picture

@slashrsm: No, this module was ported as part of a project at the end of last year. We had no need for password_policy_password_tab, so it wasn't ported during the same effort.

slashrsm’s picture

Can you give any estimate how much work is needed to do that?

erikwebb’s picture

I currently don't have to time to do that. Password Policy was relatively straightforward, so I can't imagine Password Policy Password Tab would be hard either. I was hoping this project could be committed into the project and someone could fill in the gaps.

deekayen’s picture

Status: Reviewed & tested by the community » Fixed

I merged it into master and gave you commit access in case I messed up the conflict resolution.

anavarre’s picture

Subscribe

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.