<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div>Hi,</div>
<div> </div>
<div>I have two servers, one here (in my office, with CentOS 6.5) and one at another facility (with RHEL 6.5). Both are running FreeRADIUS 3.0.4 rc 1 from what I can establish. </div>
<div> </div>
<div>I have these attributes in my reply:</div>
<div> </div>
<div>MS-MPPE-Encryption-Policy = Encryption-Required</div>
<div>MS-MPPE-Encryption-Types = 4</div>
<div>MS-MPPE-Send-Key = 0xf1ad6cfa6e603b2bdb8480bd7ac84239</div>
<div>MS-MPPE-Recv-Key = 0x6cfc74047d13c6efa111a66fd9e360f4</div>
<div>EAP-Message = 0x03020004</div>
<div>Message-Authenticator = 0x00000000000000000000000000000000</div>
<div>SAML-AAA-Assertion = '<saml:Assertion xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\" IssueInstant=\"2014-08-22T13:48:00\" ID=\"e9e79e59-9fb5-4b4e-b8c6-a4ef77559516\" Version=\"2.0\">'</div>
<div>SAML-AAA-Assertion = '<saml:Issuer>urn:mace:ac.uk:diamond.ac.uk</saml:Issuer>'</div>
<div>SAML-AAA-Assertion = '<saml:AttributeStatement><saml:Attribute NameFormat=\"urn:oasis:names:tc:SAML:2.0:attrname-format:uri\" Name=\"urn:oid:1.3.6.1.4.1.5923.1.1.1.7\">'</div>
<div>SAML-AAA-Assertion = '<saml:AttributeValue>sysdev</saml:AttributeValue>'</div>
<div>SAML-AAA-Assertion = '</saml:Attribute></saml:AttributeStatement></saml:Assertion>'</div>
<div> </div>
<div>In the server config in my office, I can use the below expression:</div>
<div> </div>
<div>if ("%{reply:SAML-AAA-Assertion[*]}" =~ /("urn:oid:1\.3\.6\.1\.4\.1\.5923\.1\.1\.1\.7")((\n|.)*?)(<saml:AttributeValue>)(\n*)(.*?)(\n*)(<\/saml:AttributeValue>)/) {</div>
<div> :</div>
<div>}</div>
<div> </div>
<div>This happily resolves to TRUE on the local server. However, on the second server, it resolves to FALSE, and I have to use the below there:</div>
<div> </div>
<div>if ("%{reply:SAML-AAA-Assertion[*]}" =~ /(urn\:oid\:1\.3\.6\.1\.4\.1\.5923\.1\.1\.1\.7)((\n|.)*?)(\<saml\:AttributeValue>)(\n*)(.*?)(\n*)(\<\/saml\:AttributeValue>)/) { </div>
<div> :</div>
<div>}</div>
<div> </div>
<div>The two regular expressions are the same with the following exceptions: All colons are escaped, all greater-as and smaller-as signs are escaped, and apparently the other server does not like having the quotes in the first regex group, even when escaped,
or when using the \Q and \E modifiers before and after. </div>
<div> </div>
<div>According to several regex tests, the above should be ok, so… question to you regular expression whizzes and to Arran and Alan is: Why does the former not work on the second server? It seems the un-escaped colons and the quotes trip the regex up even though
it should be ok?</div>
<div> </div>
<div>Stefan Paetow</div>
<div>Moonshot Industry & Research Liaison Coordinator</div>
<div>t: +44 (0)1235 822 125</div>
<div> </div>
<div>Janet, the UK's research and education network.</div>
<div> </div>
<div> </div>
<div> </div>
</span></font>
<PRE>Janet(UK) is a trading name of Jisc Collections and Janet Limited, a
not-for-profit company which is registered in England under No. 2881024
and whose Registered Office is at Lumen House, Library Avenue,
Harwell Oxford, Didcot, Oxfordshire. OX11 0SG. VAT No. 614944238
</PRE></body>
</html>