Commit 82c978e3 authored by Carsten  Rose's avatar Carsten Rose

Check for SIP and SIPP

parent edc57fd6
Pipeline #992 passed with stage
in 1 minute and 47 seconds
......@@ -681,11 +681,25 @@ class Link {
switch ($key) {
case TOKEN_ENCRYPTION:
case TOKEN_SIP:
if ($value !== '0' && $value !== '1') {
throw new UserReportException ("Invalid value for token '$key': '$value''", ERROR_INVALID_VALUE);
}
break;
case TOKEN_SIP:
switch (strlen($value)) {
case 1:
if ($value !== '0' && $value !== '1') {
throw new UserReportException ("Invalid value for token '$key': '$value''", ERROR_INVALID_VALUE);
}
break;
case 10: // 'yyyy-mm-dd'
case 16: // 'yyyy-mm-dd hh:mm'
case 19: // 'yyyy-mm-dd hh:mm:ss'
break;
default:
throw new UserReportException ("Invalid value for token '$key': '$value''", ERROR_INVALID_VALUE);
}
break;
case TOKEN_ACTION_DELETE:
switch ($value) {
case TOKEN_ACTION_DELETE_AJAX:
......
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