mirror of
https://github.com/kevachat/webapp.git
synced 2025-01-09 06:17:59 +00:00
fix cookies path
This commit is contained in:
parent
e32f7ce70f
commit
8250a2f045
@ -541,7 +541,8 @@ class RoomController extends AbstractController
|
|||||||
setcookie(
|
setcookie(
|
||||||
'KEVACHAT_SIGN',
|
'KEVACHAT_SIGN',
|
||||||
$request->get('sign'),
|
$request->get('sign'),
|
||||||
time() + $this->getParameter('app.session.default.timeout')
|
time() + $this->getParameter('app.session.default.timeout'),
|
||||||
|
'/'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,8 +119,8 @@ class UserController extends AbstractController
|
|||||||
$memcached->delete($session);
|
$memcached->delete($session);
|
||||||
|
|
||||||
// Delete cookies
|
// Delete cookies
|
||||||
setcookie('KEVACHAT_SESSION', '', -1);
|
setcookie('KEVACHAT_SESSION', '', -1, '/');
|
||||||
setcookie('KEVACHAT_SIGN', '', -1);
|
setcookie('KEVACHAT_SIGN', '', -1, '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Redirect to main page
|
// Redirect to main page
|
||||||
@ -299,7 +299,7 @@ class UserController extends AbstractController
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Validate password length
|
// Validate password length
|
||||||
if (mb_strlen($request->get('password')) <= 12)
|
if (mb_strlen($request->get('password')) <= 6)
|
||||||
{
|
{
|
||||||
return $this->redirectToRoute(
|
return $this->redirectToRoute(
|
||||||
'user_add',
|
'user_add',
|
||||||
@ -376,7 +376,7 @@ class UserController extends AbstractController
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Save session to user cookies
|
// Save session to user cookies
|
||||||
if (!setcookie('KEVACHAT_SESSION', $session, time() + $this->getParameter('app.session.default.timeout')))
|
if (!setcookie('KEVACHAT_SESSION', $session, time() + $this->getParameter('app.session.default.timeout'), '/'))
|
||||||
{
|
{
|
||||||
return $this->redirectToRoute(
|
return $this->redirectToRoute(
|
||||||
'user_login',
|
'user_login',
|
||||||
@ -581,7 +581,7 @@ class UserController extends AbstractController
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Save session to user cookies
|
// Save session to user cookies
|
||||||
if (!setcookie('KEVACHAT_SESSION', $session, time() + $this->getParameter('app.session.default.timeout')))
|
if (!setcookie('KEVACHAT_SESSION', $session, time() + $this->getParameter('app.session.default.timeout'), '/'))
|
||||||
{
|
{
|
||||||
return $this->redirectToRoute(
|
return $this->redirectToRoute(
|
||||||
'user_login',
|
'user_login',
|
||||||
|
Loading…
Reference in New Issue
Block a user