Browse Source

increase token column width

add some range to time() assertions
tags/v9.1.0beta1
Christoph Wurst 8 years ago
parent
commit
aa85edd224
No account linked to committer's email address

+ 1
- 1
build/integration/features/bootstrap/BasicStructure.php View File

* @param string $user * @param string $user
*/ */
public function loggingInUsingWebAs($user) { public function loggingInUsingWebAs($user) {
$loginUrl = substr($this->baseUrl, 0, -5);
$loginUrl = substr($this->baseUrl, 0, -5) . '/login';
// Request a new session and extract CSRF token // Request a new session and extract CSRF token
$client = new Client(); $client = new Client();
$response = $client->get( $response = $client->get(

+ 1
- 2
core/Controller/LoginController.php View File

} }


/** /**
* @NoCSRFRequired
* @PublicPage * @PublicPage
* @UseSession * @UseSession
* *
} }
} }
if ($loginResult) { if ($loginResult) {
return new RedirectResponse($this->urlGenerator->linkToRoute('login#showLoginForm'));
return new RedirectResponse($this->urlGenerator->linkToRoute('core.login.showLoginForm'));
} }
$this->userSession->createSessionToken($this->request, $user, $password); $this->userSession->createSessionToken($this->request, $user, $password);
if (!is_null($redirect_url) && $this->userSession->isLoggedIn()) { if (!is_null($redirect_url) && $this->userSession->isLoggedIn()) {

+ 1
- 1
db_structure.xml View File

<type>text</type> <type>text</type>
<default></default> <default></default>
<notnull>true</notnull> <notnull>true</notnull>
<length>100</length>
<length>200</length>
</field> </field>


<field> <field>

+ 1
- 1
tests/core/controller/LoginControllerTest.php View File

->will($this->returnValue(false)); ->will($this->returnValue(false));
$this->urlGenerator->expects($this->once()) $this->urlGenerator->expects($this->once())
->method('linkToRoute') ->method('linkToRoute')
->with('login#showLoginForm')
->with('core.login.showLoginForm')
->will($this->returnValue($loginPageUrl)); ->will($this->returnValue($loginPageUrl));


$this->userSession->expects($this->never()) $this->userSession->expects($this->never())

+ 2
- 2
tests/lib/user/session.php View File

->will($this->returnValue(true)); ->will($this->returnValue(true));
$session->expects($this->at(2)) $session->expects($this->at(2))
->method('set') ->method('set')
->with('last_login_check', time());
->with('last_login_check', $this->equalTo(time(), 10));


$session->expects($this->at(3)) $session->expects($this->at(3))
->method('get') ->method('get')
->with($token); ->with($token);
$session->expects($this->at(4)) $session->expects($this->at(4))
->method('set') ->method('set')
->with('last_token_update', time());
->with('last_token_update', $this->equalTo(time(), 10));


$manager->expects($this->any()) $manager->expects($this->any())
->method('get') ->method('get')

Loading…
Cancel
Save