2024-07-09 06:52:00 +00:00
|
|
|
import re
|
2019-06-25 06:32:25 +00:00
|
|
|
|
2024-07-09 06:52:00 +00:00
|
|
|
from werkzeug.local import Local
|
2023-03-09 03:15:18 +00:00
|
|
|
|
|
|
|
|
2019-06-25 06:32:25 +00:00
|
|
|
thread_local = Local()
|
2024-07-09 06:52:00 +00:00
|
|
|
exclude_encrypted_fields = ('secret_type', 'secret_strategy', 'password_rules')
|
|
|
|
similar_encrypted_pattern = re.compile(
|
|
|
|
'password|secret|token|passphrase|private|key|cert', re.IGNORECASE
|
|
|
|
)
|
2019-06-25 06:32:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
def _find(attr):
|
|
|
|
return getattr(thread_local, attr, None)
|