Pattern

Pattern Recognition and Optimization in Mendix

Pattern Recognition and Optimization in Mendix

I recently received a few requirements for a project related to security of passwords.

  1. If a user attempts to change their password and reuse three of the same characters in sequence, the password change should be rejected.

    1. Example: ‘!abc1abc4’ is rejected because ‘abc’ is repeated somewhere in the string
  2. If a user attempts to change their password and has in common a 6-character sequence with their user name, the password change should be rejected

    1. Example: User name = ‘pgriffin’ and the new password is ‘!3riffin#$’, it is rejected because ‘riffin’ is consistant in both

In this post I will detail how I solved it with one microflow and then how I optimized it. If you like to dive into the weeds, read along!