We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents df344c3 + 1e6a2de commit 24ab0a3Copy full SHA for 24ab0a3
1 file changed
tom_common/session_utils.py
@@ -260,6 +260,9 @@ def reencrypt_data(user) -> None:
260
261
# Get the new raw password from the User instance
262
new_raw_password = user._password # CAUTION: this is implemenation dependent (using _<property>)
263
+ if not new_raw_password:
264
+ logger.error(f"User {user.username} does not have a raw password available. Cannot re-encrypt sensitive data.")
265
+ return
266
# Generate a new encryption_key with the new raw password
267
new_encryption_key: bytes = create_cipher_encryption_key(user, new_raw_password)
268
# Generate a new encoding Fernet cipher with the new encryption key
0 commit comments