Commit be4f6d65 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Session.php: initialize uninitialzed variables

Sip.php, Constants.php: define constant
parent 16073727
......@@ -323,6 +323,7 @@ const MSG_HEADER = 'header';
const MSG_CONTENT = 'content';
const MSG_ERROR_CODE = 'errorCode';
const SIP_TOKEN_LENGTH = 13; // length of string returned by `uniqid()`
const SIP_SIP = CLIENT_SIP; // s
const SIP_RECORD_ID = CLIENT_RECORD_ID; // r
const SIP_TARGET_URL= '_targetUrl'; // URL where to jump after delete()
......
......@@ -47,6 +47,7 @@ class Session {
$feUserUidSession = Session::get(SESSION_FE_USER_UID);
$feUserSession = Session::get(SESSION_FE_USER);
$feUserGroup = false;
if (isset($GLOBALS["TSFE"])) {
// if noone is logged in: 0
......
......@@ -212,7 +212,7 @@ class Sip {
public function getVarsFromSip($s) {
# Check if parameter is manipulated
if (strlen($s) != 13) {
if (strlen($s) != SIP_TOKEN_LENGTH) {
throw new UserFormException("Broken Parameter", ERROR_BROKEN_PARAMETER);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment