Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] password_security: update password_write_date on copy #713

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Commits on Oct 22, 2024

  1. [FIX] password_security: update password_write_date on copy

    Sometimes users are created from a template user via a `copy()`.
    This has the issue that a password is passed via the `vals` of the copy
    and therefore never seen by the `write()` function.
    
    As a result, the `password_write_date` field is left to the value of the
    template, which is either outdated or null.
    
    A concrete bug that resulted from this is that newly created users were
    asked to renew their password on their very first login.
    
    ---
    
    This commit reapplies the same logic of the `write()` method to the
    `copy()` method as well.
    
    It also changes the unit test test_03_create_user_signup to create the
    user at some time in the past so that
    ```python
    assertNotEqual(password_write_date, created_user.password_write_date)
    ```
    makes sense.
    
    Finally it fixes the do_signup method to user the current user's
    password otherwise the password_write_date will be overwritten even when
    inputting invalid passwords
    maneandrea committed Oct 22, 2024
    Configuration menu
    Copy the full SHA
    15da524 View commit details
    Browse the repository at this point in the history