Moin
3 نوفمبر 2025، 9:35م
1
عندما تتحقق من عنوان بريد إلكتروني لمستخدم من قبل، يبقى اسم المستخدم الخاص به في سجلات إجراءات الموظفين، حتى لو تم تعطيل Log anonymizer details.
خطوات التكرار:
قم بتعطيل إعداد الموقع Log anonymizer details.
افتح صفحة مسؤول المستخدم.
انقر فوق الزر “إظهار” لعرض عنوان البريد الإلكتروني.
قم بإخفاء هوية المستخدم.
انظر إلى سجلات إجراءات الموظفين.
النتيجة: على الرغم من أن الإعداد يهدف إلى منع ربط اسم المستخدم بالأسماء المجهولة، إلا أنه واضح بسبب سجل “التحقق من البريد الإلكتروني”. أتوقع أن يتم إخفاء هوية اسم المستخدم في المسار المحدد هناك إذا كان الإعداد يمنع حفظ اسم المستخدم.
إذا كان إعداد Log anonymizer details يحفظ اسم المستخدم في السجلات أثناء إخفاء الهوية، فلا يهم أن يبقى اسم المستخدم دون تغيير في المسار.
إعجاب واحد (1)
من الصعب / الخطير إزالة الأشياء بناءً على اسم المستخدم، لذا اخترت استبدال حقلي السياق والتفاصيل بالكامل برسالة [تمت الإزالة بسبب إخفاء هوية المستخدم]
main ← fix-anonymizer-historical-logs
opened 12:50PM - 01 Jan 26 UTC
When `log_anonymizer_details` is disabled, the anonymization process correctly a… voids recording the old username in the new "anonymize_user" log entry. However, historical staff action logs created before anonymization (like "check_email") could still contain the original username in fields like `context` or `previous_value`, making it possible to link an anonymized user back to their original identity.
For example, when an admin views a user's email from `/admin/users/123/johndoe`, the staff action log stores that URL path in the `context` field. After anonymization, this path still contains "johndoe", defeating the purpose of the setting.
This fix passes the original username to the AnonymizeUser background job, which now scrubs any historical UserHistory records that contain the username. Rather than attempting error-prone string replacement, affected fields are replaced with "[removed due to user anonymization]" to make it clear why the data is missing while preserving the audit trail.
Ref - https://meta.discourse.org/t/387500
3 إعجابات
zogstrip
تم إغلاقه في
21 يناير 2026، 8:00ص
6
تم إغلاق هذا الموضوع تلقائيًا بعد 46 ساعة. لم يعد الرد مسموحًا به.
@Moin لاحظت أنني كنت متساهلاً للغاية عند إجراء التحديث
main ← fix/anonymizer-selective-field-replacement
opened 04:19PM - 21 Jan 26 UTC
Follow-up to 1fd17242d1.
The previous implementation replaced all four UserHi… story fields (context, details, previous_value, new_value) whenever any one of them contained the username. This caused confusing output in the staff action logs UI - for example, a "check email" action that only had the username in the context field would display:
New: [removed due to user anonymization]
Previous: [removed due to user anonymization]
[removed due to user anonymization]
...even though those fields were originally empty.
Now each field is updated independently using SQL CASE expressions, so only fields that actually contain the username get replaced. Fields with unrelated content or nil values are preserved. This keeps the anonymization effective while avoiding the cluttered display.
Ref - https://meta.discourse.org/t/-/387500
إعجاب واحد (1)
zogstrip
تم إغلاقه في
2 فبراير 2026، 7:00ص
11
تم إغلاق هذا الموضوع تلقائيًا بعد 3 أيام. لم يعد الردود الجديدة مسموحًا بها.