File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,13 @@ public function toAbsoluteEndpoint(bool $onlyMajorParameters = false): string
7272 {
7373 $ endpoint = $ this ->endpoint ;
7474
75- foreach ($ this ->vars as $ var ) {
75+ // Process in order of longest to shortest variable name to prevent partial replacements (see #16).
76+ $ vars = $ this ->vars ;
77+ usort ($ vars , function ($ a , $ b ) {
78+ return strlen ($ b ) <=> strlen ($ a );
79+ });
80+
81+ foreach ($ vars as $ var ) {
7682 if (
7783 ! isset ($ this ->args [$ var ]) ||
7884 (
Original file line number Diff line number Diff line change @@ -416,6 +416,7 @@ protected function checkunboundQueue(): void
416416 public static function isUnboundEndpoint (Request $ request ): bool
417417 {
418418 $ url = $ request ->getUrl ();
419+
419420 return
420421 (strpos ($ url , '/interactions ' ) === 0 && strpos ($ url , '/callback ' ) !== false )
421422 || strpos ($ url , '/webhooks ' ) === 0 ;
You can’t perform that action at this time.
0 commit comments