[ansi-sql compliant updates] - postgresql/mssql/mysql/sqlite - password_policy_update_8304

Created on 14 August 2023, over 1 year ago
Updated 15 April 2024, 8 months ago

Problem/Motivation

When upgrading sites using postgresql or sqlite or mssql instead of MariaDB/Persona/MySQL requires a patch upstream that hasn't been merged into a release of password_policy

Drupal 9.5.10+ or Drupal 10.0.10+
Postgresql 12.x
password policy version 3.2 included with upgraded wxt releases

password_policy 3.1 works fine, but upgrading to password_policy 3.2 fails as follows:

<code>>  [error]  SQLSTATE[42601]: Syntax error: 7 ERROR:  syntax error at or near "t1"
> LINE 1: DELETE t1 FROM "password_policy_history" t1 INNER JOIN "pass...
>                ^: DELETE t1 FROM "password_policy_history" t1 INNER JOIN "password_policy_history" t2 WHERE t1.id < t2.id AND t1.pass_hash = t2.pass_hash AND t1.timestamp = t2.timestamp; Array
> (
> )

Steps to reproduce

TBD

Proposed resolution

see patch The intended patch for postgresql doesn't work with mysql and vice versa so I created a new patch that deletes all rows from the password policy history table instead. The deleting of all rows on this table is ANSI sql compliant, this resolves the duplicates problem at a cost of sacrificing all history for password policy however the benefit is it's cross platform compatible and does not cause an exception.

Remaining tasks

see patch

User interface changes

TBD

API changes

TBD

Data model changes

TBD

🐛 Bug report
Status

Closed: outdated

Version

5.0

Component

Code

Created by

🇨🇦Canada joseph.olstad

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024