geteduroam / windows-app

Windows application for geteduroam
BSD 3-Clause "New" or "Revised" License
4 stars 3 forks source link

Add XSD validation #39

Open jornane opened 2 years ago

jornane commented 2 years ago

Before reading an eap-config profile, verify the XSD. This prevents loading profiles that do not match the XSD, this may in some cases be a bit too strict, but on the other hand it prevents issues like #38.

The XSD is copied from the CAT project, and modified.

The Username field is not used by this application. However, refusing it would yield problems with keeping compatibility with the current Android app.

An issue that could occur when merging this code, is that the XSD often specifies a sequence, which mandates a certain ordering in the eap-config file. Current we do not care about this ordering, but we would if this was merged.

For example, this would be valid:

<IEEE80211>
<SSID>eduroam</SSID>
<MinRSNProto>CCMP</MinRSNProto>
</IEEE80211>

but this would not:

<IEEE80211>
<MinRSNProto>CCMP</MinRSNProto>
<SSID>eduroam</SSID>
</IEEE80211>