File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
engine/Shopware/Controllers/Backend
tests/Functional/Controllers/Backend Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -791,6 +791,9 @@ private function getCustomer(int $id): array
791
791
$ data ['lastLogin ' ] = new DateTime ('@0 ' );
792
792
}
793
793
794
+ unset($ data ['sessionId ' ]);
795
+ unset($ data ['hashPassword ' ]);
796
+
794
797
return $ data ;
795
798
}
796
799
Original file line number Diff line number Diff line change @@ -60,6 +60,23 @@ public function setUp(): void
60
60
Shopware ()->Plugins ()->Backend ()->Auth ()->setNoAcl ();
61
61
}
62
62
63
+ public function testSensitiveDataIsNotSend (): void
64
+ {
65
+ $ customer = $ this ->createDummyCustomer ();
66
+
67
+ $ params = [
68
+ 'customerID ' => $ customer ->getId (),
69
+ ];
70
+ $ this ->Request ()->setMethod ('POST ' )->setPost ($ params );
71
+ $ this ->dispatch ('/backend/Customer/getDetail ' );
72
+
73
+ $ body = $ this ->View ()->getAssign ();
74
+ static ::assertTrue ($ body ['success ' ]);
75
+ static ::assertArrayNotHasKey ('hashPassword ' , $ body ['data ' ]);
76
+ static ::assertArrayNotHasKey ('sessionId ' , $ body ['data ' ]);
77
+ static ::
assertEquals (
'[email protected] ' ,
$ body[
'data ' ][
'email ' ]);
78
+ }
79
+
63
80
/**
64
81
* Test saveAction controller action - change payment mean
65
82
*
You can’t perform that action at this time.
0 commit comments