Unable to retrieve a cookie set by another application on the same domain We have a Laravel app that sets a cookie:

public function make($name, $value, $minutes = 0, $path = null, $domain = null, $secure = false, $httpOnly = true)
{
    list($path, $domain) = $this-&gt;getPathAndDomain($path, $domain);

    $time = ($minutes == 0) ? 0 : time() + ($minutes * 60);

    return new Cookie($name, $value, $time, $path, $domain, $secure, $httpOnly);
}


The values passed are as follows:

array (size=7)
    0 =&gt; string 'imph_auth' (length=9)
    1 =&gt; string 'Russ Back' (length=9)
    2 =&gt; int 2628000
    3 =&gt; null
    4 =&gt; null
    5 =&gt; boolean false
    6 =&gt; boolean true


I've tried to retrieve that cookie in a Craft template as follows:

craft.request.getCookie('imph_auth')


However I get null when I know that it's been set (I can browse to a Laravel template on the same domain and get the cookie).

I note the JavaScript warning in the Craft docs but this is set in PHP, however I can see the getCookies() method of the CookieCollection class runs each cookie through craft()->security->validateData() and fails validation.

Is there any way I can get around this without resorting to my own PHP in the template or a custom plugin?
Is there any way I can get around this without resorting to my own PHP in the template or a custom plugin?


You can't have PHP is a Twig template, but I think you'd need a real simple plugin for this.

It would just have an init() method that did:

craft()-&gt;request-&gt;enableCookieValidation = false;


Just be aware that's going to make it much easier for people to potentially tamper with cookie values.