Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/src/redux/sagas/profile.sagas.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const ROOT_SLUG = '/accounts/api/profile';

export const getPasswordStatus = (h) => {
const passwordChanged = h.filter((entry) =>
entry.comment.includes('Password changed')
entry.comment.includes('Change Password')

@taoteg taoteg Jun 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In the case where a user maybe doesn't change their password ever... (I think annual AUP update is required, but not sure a password reset is mandated by that process), do we need to handle all possible cases:

  • only the Change password block
  • both the Change password and the Password changed blocks
  • only the Password changed block
    with the latest Change password block taking precedent?

Or should we ignore the old way and just look for the current Change password structure?

Or maybe look for either bock and take whichever has the most recent timestamp?
Maching against only the comment string seems fragile.

Example (from my profile data):

# What displays now:
    {
      "status": "Active",
      "timestamp": "2022-02-01T17:22:20Z",
      "actor": "jgentle",
      "comment": "Password changed by user."
    },

# What should display:
    {
      "status": "Active",
      "timestamp": "2026-01-20T17:19:38Z",
      "actor": "jgentle",
      "comment": "Change Password"
    },

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

These are great questions, I'd love to hear thoughts from a few more folks. Password changes are in fact not mandated hence why my profile was not displaying anything, and I also don't love that this could easily break again at any point, though admittedly it seems no one noticed or cared for quite a while...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I wonder if we can do a simple regex that searches for any combination of "password" and "change".... 🤔

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@taoteg just pushed up a slightly better solution (imo), let me know what you think.

);
if (isEmpty(passwordChanged)) return '';
const lastChanged = passwordChanged.pop().timestamp;
Expand Down
Loading