mirror of
				https://github.com/gyurix1968/guacamole-client.git
				synced 2025-10-31 00:53:21 +00:00 
			
		
		
		
	GUACAMOLE-36: Record and maintain password history.
This commit is contained in:
		| @@ -63,7 +63,19 @@ | ||||
|             #{record.passwordHash,jdbcType=BINARY}, | ||||
|             #{record.passwordSalt,jdbcType=BINARY}, | ||||
|             #{record.passwordDate,jdbcType=TIMESTAMP} | ||||
|         ) | ||||
|         ); | ||||
|  | ||||
|         DELETE FROM guacamole_user_password_history | ||||
|         WHERE password_history_id <= ( | ||||
|             SELECT password_history_id | ||||
|             FROM ( | ||||
|                 SELECT password_history_id | ||||
|                 FROM guacamole_user_password_history | ||||
|                 WHERE user_id = #{record.userID,jdbcType=INTEGER} | ||||
|                 ORDER BY password_date DESC | ||||
|                 LIMIT 1 OFFSET #{maxHistorySize} | ||||
|             ) old_password_record | ||||
|         ); | ||||
|  | ||||
|     </insert> | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user