When logging in on systems running PHP7 or greater, if the warning threshold number is set to an empty string as is the default and as is described in the documentation as the proper value, the module will error because PHP attempts to multiple the empty string by valid numbers. This can be fixed by setting the warning threshold to '0' but some checks in the module code could suppress this.

CommentFileSizeAuthor
#2 password-policy-invalid-number-2895670.patch744 byteslliss

Comments

lliss created an issue. See original summary.

lliss’s picture

StatusFileSize
new744 bytes
lliss’s picture

Status: Active » Needs review
aohrvetpv’s picture

Thank you for the bug report and patch. I can't think of a better solution than you've provided.

Other possibilities:
- We could add validation to disallow a blank entry for "Password Expiration Warning". But that would create an inconsistency with other configuration form fields where you can use a blank entry to disable the associated functionality.
- We could convert blank entries to 0 upon saving the form, but then the user would see 0 when they viewed the configuration form.

Explicitly converting '' to 0 as needed seems fine. Open to better ideas.

I quickly checked the code for other instances of this problem with expiration warnings, but didn't see any.

  • AohRveTPV committed e43ef55 on 7.x-1.x authored by lliss
    Issue #2895670 by lliss: Errors re invalid number on PHP7+
    
aohrvetpv’s picture

Does the module error prevent login? Would like to know how serious the issue is for the sake of deciding when to make a next release. I don't currently have a PHP 7 environment to test in. Thank you.

aohrvetpv’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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