details: https://code.tryton.org/tryton/commit/a45a59ae4933
branch: 7.0
user: Cédric Krier <[email protected]>
date: Thu Nov 26 10:59:50 2026 +0100
description:
Prevent searching on password fields
Closes #15266
(grafted from 959f63b78ea6dbb9565addc0d0c86e5461e4fc9e)
diffstat:
modules/web_user/CHANGELOG | 1 +
modules/web_user/user.py | 10 +++++++++-
trytond/CHANGELOG | 1 +
trytond/trytond/res/user.py | 8 ++++++++
4 files changed, 19 insertions(+), 1 deletions(-)
diffs (61 lines):
diff -r add2f9621c46 -r a45a59ae4933 modules/web_user/CHANGELOG
--- a/modules/web_user/CHANGELOG Tue Nov 24 10:45:09 2026 +0100
+++ b/modules/web_user/CHANGELOG Thu Nov 26 10:59:50 2026 +0100
@@ -1,3 +1,4 @@
+* Prevent searching on password hash and reset password token (issue15266)
* Forbid to read the user's reset password and password hash (issue15259
issue15263)
Version 7.0.2 - 2026-02-18
diff -r add2f9621c46 -r a45a59ae4933 modules/web_user/user.py
--- a/modules/web_user/user.py Tue Nov 24 10:45:09 2026 +0100
+++ b/modules/web_user/user.py Thu Nov 26 10:59:50 2026 +0100
@@ -19,7 +19,7 @@
import html2text
except ImportError:
html2text = None
-from sql import Literal
+from sql import Literal, Null
from sql.conditionals import Coalesce
from sql.functions import CurrentTimestamp
from sql.operators import Equal
@@ -123,6 +123,14 @@
return 'x' * 10
@classmethod
+ def domain_password_hash(cls, domain, tables):
+ return Null
+
+ @classmethod
+ def domain_reset_password_token(cls, domain, tables):
+ return Null
+
+ @classmethod
def set_password(cls, users, name, value):
pool = Pool()
User = pool.get('res.user')
diff -r add2f9621c46 -r a45a59ae4933 trytond/CHANGELOG
--- a/trytond/CHANGELOG Tue Nov 24 10:45:09 2026 +0100
+++ b/trytond/CHANGELOG Thu Nov 26 10:59:50 2026 +0100
@@ -1,3 +1,4 @@
+* Prevent searching on password hash and reset password (issue15266)
* Enforce access rights when exporting resource data (issue15264)
* Forbid to read the user's reset password (issue15258)
* Limit the decompressed size of request (issue15257)
diff -r add2f9621c46 -r a45a59ae4933 trytond/trytond/res/user.py
--- a/trytond/trytond/res/user.py Tue Nov 24 10:45:09 2026 +0100
+++ b/trytond/trytond/res/user.py Thu Nov 26 10:59:50 2026 +0100
@@ -253,6 +253,14 @@
return 'x' * 10
@classmethod
+ def domain_password_hash(cls, domain, tables):
+ return Null
+
+ @classmethod
+ def domain_password_reset(cls, domain, tables):
+ return Null
+
+ @classmethod
def set_password(cls, users, name, value):
if value == 'x' * 10:
return