0

http://yourdomainname.com/clientname/sso/service/vendor/versatileknack/relayState/https%3A%2F%2Fwww.versatileknack.com%3Fid%3D123456789%26cilent%3Dabc

I have below code in my Symfony(1.5.10-dev) Controller for above URL. I am getting correct query string value for "vendor" parameter but for "relayState" parameter I am getting incomplete value. Is there any way to get complete value (https://www.versatileknack.com?id=123456789&cilent=abc) for "relayState" parameter?

$vendor = $request->getParameter('vendor'); // versatileknack

$relayState = $request->getParameter('relayState'); // https:

$relayState = urldecode($request->getParameter('relayState')); // https:

  • Please show your routing.yml file about that rule (url) – davidvegacl Nov 24 '17 at 02:50
  • I have the next configuration in routing.yml for provided URL. default: url: /:clientId/:module/:action/* – Akshay Salaskar Nov 24 '17 at 07:24
  • Any more lines in your routing? You need tu specify with regular expressions where is the start of one or another parameter in the URL. – davidvegacl Nov 26 '17 at 01:53
  • As per your suggestion I have added regular expression (requirements: relayState: ".+") for relayState parameter. Now it's returning "https:/www.versatileknack.com" but not the complete URL and also it's returning only single slash(/). – Akshay Salaskar Nov 28 '17 at 07:40
  • Consider this: "If the route defines several placeholders and you apply this permissive regular expression to all of them, the results won't be the expected. For example, if the route definition is /share/{path}/{token} and both path and token accept /, then path will contain its contents and the token, and token will be empty." – davidvegacl Nov 29 '17 at 14:56
  • No, I had created separate route for this URL for adding regular expression. Below solution is worked for me. https://stackoverflow.com/questions/11449577/why-is-base64-encode-adding-a-slash-in-the-result – Akshay Salaskar Dec 04 '17 at 06:46

0 Answers0