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
791791            $ data ['lastLogin ' ] = new  DateTime ('@0 ' );
792792        }
793793
794+         unset($ data ['sessionId ' ]);
795+         unset($ data ['hashPassword ' ]);
796+ 
794797        return  $ data ;
795798    }
796799
Original file line number Diff line number Diff line change @@ -60,6 +60,23 @@ public function setUp(): void
6060        Shopware ()->Plugins ()->Backend ()->Auth ()->setNoAcl ();
6161    }
6262
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+ 
6380    /** 
6481     * Test saveAction controller action - change payment mean 
6582     * 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments