Most SLL-related code in Laravel checks to see if `application.ssl`
is true before doing an action requiring it. `Cookie::put()` is the
only exception that I've found, to date, that doesn't test for SSL.
This checks to see that the SSL is enabled when attempting to set a
secure cookie.
To verify, set `application.ssl` to false (without this patch) then
run:
Cookie::put('foo', 'bar', 0, '/', null, true);
You will get an exception because of line 90 in `cookie.php`:
if ($secure and ! Request::secure())
{
throw new \Exception("Attempting to set secure cookie over HTTP.");
}
With this patch you will not get this error unless both `application.ssl`
is true, and the cookie `$secure` flag is set.
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| auth/drivers | Loading commit data... | |
| cache/drivers | Loading commit data... | |
| cli | Loading commit data... | |
| database | Loading commit data... | |
| documentation | Loading commit data... | |
| profiling | Loading commit data... | |
| routing | Loading commit data... | |
| session | Loading commit data... | |
| tests | Loading commit data... | |
| vendor/Symfony/Component | Loading commit data... | |
| asset.php | Loading commit data... | |
| auth.php | Loading commit data... | |
| autoloader.php | Loading commit data... | |
| blade.php | Loading commit data... | |
| bundle.php | Loading commit data... | |
| cache.php | Loading commit data... | |
| config.php | Loading commit data... | |
| cookie.php | Loading commit data... | |
| core.php | Loading commit data... | |
| crypter.php | Loading commit data... | |
| database.php | Loading commit data... | |
| error.php | Loading commit data... | |
| event.php | Loading commit data... | |
| file.php | Loading commit data... | |
| fluent.php | Loading commit data... | |
| form.php | Loading commit data... | |
| hash.php | Loading commit data... | |
| helpers.php | Loading commit data... | |
| html.php | Loading commit data... | |
| input.php | Loading commit data... | |
| ioc.php | Loading commit data... | |
| lang.php | Loading commit data... | |
| laravel.php | Loading commit data... | |
| log.php | Loading commit data... | |
| memcached.php | Loading commit data... | |
| messages.php | Loading commit data... | |
| paginator.php | Loading commit data... | |
| pluralizer.php | Loading commit data... | |
| redirect.php | Loading commit data... | |
| redis.php | Loading commit data... | |
| request.php | Loading commit data... | |
| response.php | Loading commit data... | |
| section.php | Loading commit data... | |
| session.php | Loading commit data... | |
| str.php | Loading commit data... | |
| uri.php | Loading commit data... | |
| url.php | Loading commit data... | |
| validator.php | Loading commit data... | |
| view.php | Loading commit data... |