mdbq 4.0.92__py3-none-any.whl → 4.0.93__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mdbq/__version__.py +1 -1
- mdbq/auth/auth_backend.py +29 -0
- {mdbq-4.0.92.dist-info → mdbq-4.0.93.dist-info}/METADATA +1 -1
- {mdbq-4.0.92.dist-info → mdbq-4.0.93.dist-info}/RECORD +6 -6
- {mdbq-4.0.92.dist-info → mdbq-4.0.93.dist-info}/WHEEL +0 -0
- {mdbq-4.0.92.dist-info → mdbq-4.0.93.dist-info}/top_level.txt +0 -0
mdbq/__version__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
VERSION = '4.0.
|
1
|
+
VERSION = '4.0.93'
|
mdbq/auth/auth_backend.py
CHANGED
@@ -915,6 +915,35 @@ class StandaloneAuthManager:
|
|
915
915
|
cursor.close()
|
916
916
|
conn.close()
|
917
917
|
|
918
|
+
def get_user_masked_email(self, username):
|
919
|
+
"""根据用户名获取脱敏邮箱(用于忘记密码提示)"""
|
920
|
+
conn = self.pool.connection()
|
921
|
+
cursor = conn.cursor()
|
922
|
+
|
923
|
+
try:
|
924
|
+
# 查找用户邮箱
|
925
|
+
cursor.execute('''
|
926
|
+
SELECT email, is_active
|
927
|
+
FROM users WHERE username = %s
|
928
|
+
''', (username,))
|
929
|
+
|
930
|
+
user = cursor.fetchone()
|
931
|
+
if not user or not user['is_active']:
|
932
|
+
return {'success': False, 'message': '用户不存在'}
|
933
|
+
|
934
|
+
# 返回脱敏邮箱
|
935
|
+
masked_email = self._mask_email(user['email'])
|
936
|
+
return {
|
937
|
+
'success': True,
|
938
|
+
'masked_email': masked_email
|
939
|
+
}
|
940
|
+
|
941
|
+
except Exception as e:
|
942
|
+
return {'success': False, 'message': f'查询用户邮箱失败: {str(e)}'}
|
943
|
+
finally:
|
944
|
+
cursor.close()
|
945
|
+
conn.close()
|
946
|
+
|
918
947
|
def request_password_reset(self, username, email):
|
919
948
|
"""请求密码重置 - 需要同时验证用户名和邮箱"""
|
920
949
|
conn = self.pool.connection()
|
@@ -1,7 +1,7 @@
|
|
1
1
|
mdbq/__init__.py,sha256=Il5Q9ATdX8yXqVxtP_nYqUhExzxPC_qk_WXQ_4h0exg,16
|
2
|
-
mdbq/__version__.py,sha256=
|
2
|
+
mdbq/__version__.py,sha256=uqyWnqEalaBGkkETtbWm-C3KxKBrzkBLQ2EZWezDmE0,18
|
3
3
|
mdbq/auth/__init__.py,sha256=pnPMAt63sh1B6kEvmutUuro46zVf2v2YDAG7q-jV_To,24
|
4
|
-
mdbq/auth/auth_backend.py,sha256=
|
4
|
+
mdbq/auth/auth_backend.py,sha256=4fbx8PehiW0BzEeJkye6a7KQcMeD1unPr4y5CFBGANI,60691
|
5
5
|
mdbq/auth/rate_limiter.py,sha256=e7K8pMQlZ1vm1N-c0HBH8tbAwzcmXSRiAl81JNZ369g,26192
|
6
6
|
mdbq/js/__init__.py,sha256=hpMi3_ZKwIWkzc0LnKL-SY9AS-7PYFHq0izYTgEvxjc,30
|
7
7
|
mdbq/js/jc.py,sha256=FOc6HOOTJwnoZLZmgmaE1SQo9rUnVhXmefhKMD2MlDA,13229
|
@@ -33,7 +33,7 @@ mdbq/route/routes.py,sha256=DHJg0eRNi7TKqhCHuu8ia3vdQ8cTKwrTm6mwDBtNboM,19111
|
|
33
33
|
mdbq/selenium/__init__.py,sha256=AKzeEceqZyvqn2dEDoJSzDQnbuENkJSHAlbHAD0u0ZI,10
|
34
34
|
mdbq/selenium/get_driver.py,sha256=1NTlVUE6QsyjTrVVVqTO2LOnYf578ccFWlWnvIXGtic,20903
|
35
35
|
mdbq/spider/__init__.py,sha256=RBMFXGy_jd1HXZhngB2T2XTvJqki8P_Fr-pBcwijnew,18
|
36
|
-
mdbq-4.0.
|
37
|
-
mdbq-4.0.
|
38
|
-
mdbq-4.0.
|
39
|
-
mdbq-4.0.
|
36
|
+
mdbq-4.0.93.dist-info/METADATA,sha256=zZnnDF3T05r1AkarZURpxPtEOwkuYmJ9_Hy-_0CUq7M,364
|
37
|
+
mdbq-4.0.93.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
38
|
+
mdbq-4.0.93.dist-info/top_level.txt,sha256=2FQ-uLnCSB-OwFiWntzmwosW3X2Xqsg0ewh1axsaylA,5
|
39
|
+
mdbq-4.0.93.dist-info/RECORD,,
|
File without changes
|
File without changes
|