diff options
author | Fredrik Domeij <fredrik.domeij@umu.se> | 2019-07-18 15:06:17 +0200 |
---|---|---|
committer | Fredrik Domeij <fredrik.domeij@umu.se> | 2019-07-18 15:06:17 +0200 |
commit | 2d54f971fd99dcecb018a1dc13d4261774f8801a (patch) | |
tree | b0708bd522d39e8623de082e9550f3671ab5631d | |
parent | 915f323feba14eefc78f9a1fa81b494eeb7b7f18 (diff) |
testGeantCoCo tuning
- replace & with & in PrivacyStatementURL (fix
prisma.research.se-shibboleth.xml false positive)
- use "Mozilla" as User-Agent instead of curl for PrivacyStatementURL
fetching (fix auth.asiaportal.info.xml false positive)
-rw-r--r-- | Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -142,10 +142,10 @@ testGeantCoCo: mdui_Test=`cat $$x | sed 's;\(</*\)[a-z0-9]*:;\1;g' | sed 's/xmlns="[^"]*"//' | xmllint --xpath "/EntityDescriptor/SPSSODescriptor/Extensions/UIInfo/$$y" - 2>/dev/null | grep $$y | grep 'xml:lang="en"'` ; \ if [ -z "$$mdui_Test" ] ; then echo " $$x: Missing xml:lang=\"en\" on mdui:$$y." | sed 's/.*/[1;31m&[0m/' ; fi ; \ done ; \ - mdui_PrivacyStatementURL=`cat $$x | sed 's;\(</*\)[a-z0-9]*:;\1;g' | sed 's/xmlns="[^"]*"//' | xmllint --xpath "/EntityDescriptor/SPSSODescriptor/Extensions/UIInfo/PrivacyStatementURL" - 2>/dev/null | grep 'PrivacyStatementURL'` ; \ + mdui_PrivacyStatementURL=`cat $$x | sed 's;\(</*\)[a-z0-9]*:;\1;g' | sed 's/xmlns="[^"]*"//' | xmllint --xpath "/EntityDescriptor/SPSSODescriptor/Extensions/UIInfo/PrivacyStatementURL" - 2>/dev/null | grep 'PrivacyStatementURL' | sed 's/&/\&/g'` ; \ if [ -z "$$mdui_PrivacyStatementURL" ] ; then echo " $$x: Missing PrivacyStatementURL." | sed 's/.*/[1;31m&[0m/' ; \ else \ - echo $$mdui_PrivacyStatementURL | sed 's/></>\n</g' | sed 's/.*\ \(xml:lang=.*\)>\(.*\)<.*/\1 \2/' | while read lang url ; do curl -s -L -m 5 $$url | grep http://www.geant.net/uri/dataprotection-code-of-conduct/v1 -q || echo " $$x missing link to geant.net in PrivacyStatementURL $$lang" | sed 's/.*/[1;31m&[0m/' ; done ; \ + echo $$mdui_PrivacyStatementURL | sed 's/></>\n</g' | sed 's/.*\ \(xml:lang=.*\)>\(.*\)<.*/\1 \2/' | while read lang url ; do curl -A 'Mozilla' -s -L -m 5 $$url | grep http://www.geant.net/uri/dataprotection-code-of-conduct/v1 -q || echo " $$x missing link to geant.net in PrivacyStatementURL $$lang" | sed 's/.*/[1;31m&[0m/' ; done ; \ fi ; \ fi ; \ requestedAttribute=`cat $$x | sed 's;\(</*\)[a-z0-9]*:;\1;g' | sed 's/xmlns="[^"]*"//' | xmllint --xpath "/EntityDescriptor/SPSSODescriptor/AttributeConsumingService/RequestedAttribute" - 2>/dev/null | grep 'RequestedAttribute'` ; \ |