Brilliant, thanks Stefan.
And it's not really me, but rather one of our Welsh organisations.
:-)
Stefan Paetow
Federated Roaming Technical Specialist
eduroam(UK), Jisc
email/teams: stefan.paetow AT jisc.ac.uk
gpg: 0x3FCE5142
On Mondays and Wednesdays, I am not available between 12:00 and 15:00. For eduroam support, please contact us via help AT jisc.ac.uk and mark it for the eduroam team’s attention.
jisc.ac.uk
Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under Company No. 5747339, VAT No. GB 197 0632 86. Jisc’s registered office is: 4 Portwall Lane, Bristol, BS1 6NB Tel: 020 3697
5800.
From:
<cat-devel-request AT lists.geant.org> on behalf of Stefan Winter <cat-devel AT lists.geant.org>
Reply to: "cat-devel AT lists.geant.org" <cat-devel AT lists.geant.org>
Date: Friday, 5 May 2023 at 12:31
To: "cat-devel AT lists.geant.org" <cat-devel AT lists.geant.org>, "geteduroam AT lists.geant.org" <geteduroam AT lists.geant.org>
Subject: Re: [[cat-devel]] A bug in CAT + geteduroam
Hi,
my, you are good at finding corner cases :-)
You found this one:
https://github.com/GEANT/CAT/blob/release_2_1/web/lib/admin/OptionParser.php#L371
Indeed, we only check whether the incoming data point is empty(), which in PHP is only true for 0-byte strings.
I'll modify the test towards doing a trim() first (https://www.php.net/manual/en/function.trim.php) which will also eliminate other funny whitespace such as tabs or
newlines.
This would be in 2.1.1 then.
Greetings,
Stefan Winter
On 04.05.23 02:11, Stefan Paetow (via cat-devel Mailing List) wrote:
Hi,
We had an interesting case in the UK today, where apparently having the 'default' name for the organisation was blank, but the English (GB) one was not. This led to the organisation not being listed in geteduroam.
I have reproduced it with the following organisation:
https://cat.eduroam.org/admin/overview_org.php?inst_id=8135
Although I can see that the CAT service drops organisation/profile attributes that are blank, it does however not check whether the attributes are completely white space (i.e. a single or multiple space or tab
characters). I consider that a bug. I would suggest that it also clears that.
geteduroam's discovery service that pulls the information into
https://discovery.eduroam.app/v1/discovery.json will, I assume, filter based on the 'default' name, and in doing so, notes that the name is effectively blank and will drop the organisation from its
list. I would recommend that if the 'default' name is blank, to check if another language (like 'English(GB)' or whichever the next language is) exists, and use that instead.
But, ideally, the data as pulled from the CAT service should not contain 'blank' (i.e. white spaced) entries whatsoever. I have not tested what happens when a profile name is 'blanked' in a similar fashion, although
I would not be surprised if CAT and geteduroam treated the profile the same way the organisation is treated, and subsequently, if the only profile has a blank name, drops the organisation because the profile 'doesn't exist'?
Can someone investigate? :-)
Thank you!
Stefan Paetow
Federated Roaming Technical Specialist
eduroam(UK), Jisc
email/teams:
stefan.paetow AT jisc.ac.uk
gpg: 0x3FCE5142
On Mondays and Wednesdays, I am not available between 12:00 and 15:00. For eduroam support, please contact us via
help AT jisc.ac.uk and mark it for the eduroam team’s attention.
jisc.ac.uk
Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under Company No. 5747339, VAT No. GB 197 0632 86. Jisc’s registered office is: 4 Portwall Lane,
Bristol, BS1 6NB Tel: 020 3697 5800.
--
This email may contain information for limited distribution only, please treat accordingly.
Fondation Restena, Stefan WINTER
Chief Technology Officer
2, avenue de l'Université
L-4365 Esch-sur-Alzette