[SUCS Devel] [Git][sucssite/sucs-site][beta] 3 commits: Cut a bit too much from motd.php :)
Imran Hussain
imranh at sucs.org
Wed Feb 6 14:33:24 GMT 2019
Imran Hussain pushed to branch beta at sucssite / sucs-site
Commits:
23899139 by Imran Hussain at 2019-01-24T12:02:12Z
Cut a bit too much from motd.php :)
- - - - -
83f21ec5 by Imran Hussain at 2019-02-06T14:25:31Z
[1/?] Allow student IDs > 6 digits
- - - - -
adbc05b8 by Imran Hussain at 2019-02-06T14:33:19Z
Merge branch 'master' into 'beta'
Allow student IDs > 6 digits to beta
See merge request sucssite/sucs-site!103
- - - - -
2 changed files:
- components/motd.php
- lib/validation.php
Changes:
=====================================
components/motd.php
=====================================
@@ -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) {
=====================================
lib/validation.php
=====================================
@@ -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)) {
View it on GitLab: https://projects.sucs.org/sucssite/sucs-site/compare/51e49732549e896d166258c1a78bc6a73077344a...adbc05b8a7d7d83d88d7b09d1fa713f49546a92b
--
View it on GitLab: https://projects.sucs.org/sucssite/sucs-site/compare/51e49732549e896d166258c1a78bc6a73077344a...adbc05b8a7d7d83d88d7b09d1fa713f49546a92b
You're receiving this email because of your account on projects.sucs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/devel/attachments/20190206/9f57fca3/attachment-0001.html>
More information about the Devel
mailing list