minor #22015 [Security] Added option to return true in the method isRememberMeRequested (WhiteEagle88)

This PR was merged into the 2.7 branch.

Discussion
----------

[Security] Added option to return true in the method isRememberMeRequested

| Q | A |
| --- | --- |
| Branch? | 2.7 |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #21807 |
| License | MIT |
| Doc PR | - |

Replaces #21989

Commits
-------

522ec3ef0c [Security] Added option to return true in the method isRememberMeRequested
This commit is contained in:
Fabien Potencier 2017-03-21 07:31:45 -07:00
commit 8ba279bc22
2 changed files with 2 additions and 1 deletions

View File

@ -318,6 +318,6 @@ abstract class AbstractRememberMeServices implements RememberMeServicesInterface
$this->logger->debug('Did not send remember-me cookie.', array('parameter' => $this->options['remember_me_parameter']));
}
return $parameter === 'true' || $parameter === 'on' || $parameter === '1' || $parameter === 'yes';
return $parameter === 'true' || $parameter === 'on' || $parameter === '1' || $parameter === 'yes' || $parameter === true;
}
}

View File

@ -251,6 +251,7 @@ class AbstractRememberMeServicesTest extends TestCase
array('1'),
array('on'),
array('yes'),
array(true),
);
}