mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed CSRF security vulnerability issue. per Alvin Lindstam. Fixes #4217
Initial patch by: Khushboo Vashi Modified by: Ashesh Vashi and Murtuza Zabuawala
This commit is contained in:
committed by
Akshay Joshi
parent
90a45557b9
commit
6f0eafb223
@@ -13,15 +13,18 @@ def change_password(self):
|
||||
'/browser/change_password', follow_redirects=True
|
||||
)
|
||||
self.assertTrue(
|
||||
'pgAdmin 4 Password Change' in response.data.decode('utf-8')
|
||||
'Password Change' in response.data.decode('utf-8')
|
||||
)
|
||||
|
||||
csrf_token = self.tester.fetch_csrf(response)
|
||||
|
||||
response = self.tester.post(
|
||||
'/browser/change_password',
|
||||
data=dict(
|
||||
password=self.password,
|
||||
new_password=self.new_password,
|
||||
new_password_confirm=self.new_password_confirm
|
||||
new_password_confirm=self.new_password_confirm,
|
||||
csrf_token=csrf_token,
|
||||
),
|
||||
follow_redirects=True
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user