Skip to content
Snippets Groups Projects
Commit c274976e authored by Imran Hussain's avatar Imran Hussain
Browse files

Merge branch 'beta' into 'sucs-site'

Beta to live

See merge request !104
parents 52425b80 adbc05b8
No related branches found
No related tags found
1 merge request!104Beta to live
Pipeline #528 passed
......@@ -4,6 +4,7 @@ $motd_file = "/etc/motd";
function decode_entities($text, $quote_style = ENT_COMPAT)
{
$text = html_entity_decode($text, $quote_style, 'ISO-8859-1'); // NOTE: UTF-8 does not work!
$text = preg_replace('~&ndash\;~i', '-', $text);
$text = preg_replace_callback('~&#x([0-9a-f]+);~i',
function ($matches) {
foreach ($matches as $match) {
......
......@@ -125,7 +125,7 @@ function validSID($SID, $override)
return true;
}
} else {
if (!preg_match("/^[0-9]*$/", $SID) || strlen($SID) != 6) {
if (!preg_match("/^[0-9]{6,}$/", $SID)) {
$error = "Invalid student ID";
return false;
} elseif (sidUsed($SID)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment