[SUCS Devel] [Git][sucssite/sucs-site][sucs-site] 4 commits: Cut a bit too much from motd.php :)

Imran Hussain imranh at sucs.org
Wed Feb 6 14:36:31 GMT 2019


Imran Hussain pushed to branch sucs-site 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
- - - - -
c274976e by Imran Hussain at 2019-02-06T14:36:28Z
Merge branch 'beta' into 'sucs-site'

Beta to live

See merge request sucssite/sucs-site!104
- - - - -


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/52425b803ba0bfb4335317a891c570237f0bdd8f...c274976e15ea4bbde96c8153817b2b0268de4974

-- 
View it on GitLab: https://projects.sucs.org/sucssite/sucs-site/compare/52425b803ba0bfb4335317a891c570237f0bdd8f...c274976e15ea4bbde96c8153817b2b0268de4974
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/36773b6f/attachment.html>


More information about the Devel mailing list