Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Fixed

- Fix retrieval of dropdown and multiline values containing special characters
- Fix repeated User updates failing with `Data too long for column cookie_token` by excluding token fields from update payloads (backport of PR #566 from GLPI 11-compatible line)

## [2.14.4] - 2025-11-25

Expand Down
15 changes: 15 additions & 0 deletions inc/userinjection.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,21 @@ public function addSpecificNeededFields($primary_type, $values)
return $fields;
}

/**
* @param array $values
*
* @return void
*/
public function reformat(&$values)
{
// Avoid re-encrypting already encrypted tokens during user updates.
$tokens = ['password_forget_token', 'personal_token', 'api_token', 'cookie_token'];
foreach ($tokens as $token) {
if (isset($values['User'][$token])) {
unset($values['User'][$token]);
}
}
}

/**
* @param array $values
Expand Down