Comments (4)
Hi,
This issue will be fixed by #16806. As it requires a migration, the patch cannot be applied in a production environment.
You can apply the following patch instead, on GLPI 10.0.14, to fix the issue until GLPI 10.0.15 is released:
diff --git a/src/User.php b/src/User.php
index 695fe4df5f..5349a49322 100644
--- a/src/User.php
+++ b/src/User.php
@@ -567,7 +567,7 @@ class User extends CommonDBTM
* and is indexed in the database, making it faster to search.
*/
return $this->getFromDBByCrit([
- 'user_dn_hash' => md5($user_dn)
+ 'user_dn_hash' => md5(Sanitizer::sanitize($user_dn))
]);
}
@@ -847,7 +847,7 @@ class User extends CommonDBTM
{
// Hash user_dn if set
if (isset($this->input['user_dn']) && is_string($this->input['user_dn']) && strlen($this->input['user_dn']) > 0) {
- $this->input['user_dn_hash'] = md5($this->input['user_dn']);
+ $this->input['user_dn_hash'] = md5(Sanitizer::sanitize($this->input['user_dn']));
}
}
@@ -3503,7 +3503,7 @@ HTML;
// Hash user_dn if is updated
if (in_array('user_dn', $this->updates)) {
$this->updates[] = 'user_dn_hash';
- $this->fields['user_dn_hash'] = is_string($this->input['user_dn']) && strlen($this->input['user_dn']) > 0 ? md5($this->input['user_dn']) : null;
+ $this->fields['user_dn_hash'] = is_string($this->input['user_dn']) && strlen($this->input['user_dn']) > 0 ? md5(Sanitizer::sanitize($this->input['user_dn'])) : null;
}
}
from glpi.
Hi,
Same problem with 10.0.13
from glpi.
2ee311a
if i change this :
public function getFromDBbyDn($user_dn)
{
[old] return $this->getFromDBByCrit(['user_dn' => $user_dn]);
/**
* We use the 'user_dn_hash' field instead of 'user_dn' for performance reasons.
* The 'user_dn_hash' field is a hashed version of the 'user_dn' field
* and is indexed in the database, making it faster to search.
*/
return $this->getFromDBByCrit([
'user_dn_hash' => md5($user_dn)
]);
}
to the old version, I have 5394 records updated ...
Edit :
With the old getFromDBbyDN i have a lot of "getFromDBByCrit expects to get one result"
With the new, nothing ...
from glpi.
I think I found a clue :
2ee311a#commitcomment-139834247
from glpi.
Related Issues (20)
- Rights problem to delete a group assigned without the update right HOT 1
- Why the task assignement (User and Group) field is exists HOT 1
- Right to update ticket for technicien only with the right 'Beeing in charge'
- It's not possible to attach files with the .rar extension HOT 2
- contract statistic link error HOT 7
- The depth of the device cannot be changed HOT 3
- loading favorites takes a long time
- Image issue when sending notifications HOT 2
- Problem with Entities that have multiple users with the same email address HOT 1
- Problems enhancement HOT 4
- "Unknown "version_compare" filter." in template "" HOT 1
- The date/time in field TTR (Time to Resolve) changes automatically
- Prevent an user from having no authorizations profile
- can't load saved searches in Global inventory HOT 1
- Bad Url HOT 1
- Aggregated switch ports are not imported correctly HOT 15
- user photos are shrunk
- Error when adding user from entity page HOT 2
- When creating a ticket contracts shown are not all available HOT 2
- user's tooltips in helpdesk objects
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glpi.