mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Move APP_VERSION hashing to smctoken encryption key
This commit is contained in:
parent
9dbf7b3bad
commit
f5045b9759
2 changed files with 2 additions and 2 deletions
|
|
@ -63,7 +63,7 @@ abstract class Account implements \JsonSerializable
|
||||||
{
|
{
|
||||||
return \sha1(\implode(APP_SALT, [
|
return \sha1(\implode(APP_SALT, [
|
||||||
$this->sEmail,
|
$this->sEmail,
|
||||||
APP_VERSION
|
$this->sLogin,
|
||||||
// \json_encode($this->Domain()),
|
// \json_encode($this->Domain()),
|
||||||
// $this->sPassword
|
// $this->sPassword
|
||||||
]));
|
]));
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ abstract class Crypt
|
||||||
if (empty($_COOKIE['smctoken'])) {
|
if (empty($_COOKIE['smctoken'])) {
|
||||||
throw new \RuntimeException('Missing smctoken');
|
throw new \RuntimeException('Missing smctoken');
|
||||||
}
|
}
|
||||||
$key = $_COOKIE['smctoken'];
|
$key = $_COOKIE['smctoken'] . APP_VERSION;
|
||||||
}
|
}
|
||||||
return \sha1($key . APP_SALT, true);
|
return \sha1($key . APP_SALT, true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue