File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -36,4 +36,16 @@ public function testCheck()
36
36
37
37
$ this ->assertTrue ($ signer ->sign ('http://example.com/foo?foo=bar&bar=foo ' ) === $ signer ->sign ('http://example.com/foo?bar=foo&foo=bar ' ));
38
38
}
39
+
40
+ public function testCheckWithDifferentArgSeparator ()
41
+ {
42
+ $ this ->iniSet ('arg_separator.output ' , '& ' );
43
+ $ signer = new UriSigner ('foobar ' );
44
+
45
+ $ this ->assertSame (
46
+ "http://example.com/foo?baz=bay&foo=bar&_hash=rIOcC%2FF3DoEGo%2FvnESjSp7uU9zA9S%2F%2BOLhxgMexoPUM%3D " ,
47
+ $ signer ->sign ('http://example.com/foo?foo=bar&baz=bay ' )
48
+ );
49
+ $ this ->assertTrue ($ signer ->check ($ signer ->sign ('http://example.com/foo?foo=bar&baz=bay ' )));
50
+ }
39
51
}
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ private function computeHash($uri)
92
92
private function buildUrl (array $ url , array $ params = array ())
93
93
{
94
94
ksort ($ params );
95
- $ url ['query ' ] = http_build_query ($ params );
95
+ $ url ['query ' ] = http_build_query ($ params, '' , ' & ' );
96
96
97
97
$ scheme = isset ($ url ['scheme ' ]) ? $ url ['scheme ' ].':// ' : '' ;
98
98
$ host = isset ($ url ['host ' ]) ? $ url ['host ' ] : '' ;
You can’t perform that action at this time.
0 commit comments