File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ public function __construct(
4040
4141 // Add a delimiter to prevent parameter splicing
4242 if (!str_ends_with ($ salt , '; ' )) {
43- $ salt = $ salt . '; ' ;
43+ $ salt .= '; ' ;
4444 }
4545
4646 $ this ->salt = $ salt ;
Original file line number Diff line number Diff line change @@ -104,15 +104,15 @@ public function testVerifySolutionSaltSplicing(): void
104104 algorithm: Algorithm::SHA256 ,
105105 maxNumber: 50000 ,
106106 number: 123 ,
107- expires: (new \ DateTimeImmutable ())->add (new \ DateInterval ('PT10S ' )),
107+ expires: (new DateTimeImmutable ())->add (new DateInterval ('PT10S ' )),
108108 params: [],
109109 salt: bin2hex (random_bytes (12 )),
110110 ));
111111
112112 $ payload = [
113113 'algorithm ' => $ challenge ->algorithm ,
114114 'challenge ' => $ challenge ->challenge ,
115- 'salt ' => $ challenge ->salt . " 1 " ,
115+ 'salt ' => $ challenge ->salt . ' 1 ' ,
116116 'signature ' => $ challenge ->signature ,
117117 'number ' => 23 ,
118118 ];
You can’t perform that action at this time.
0 commit comments