[RADIATOR] regex match in realm

Heikki Vatiainen hvn at open.com.au
Mon Jul 30 14:29:52 CDT 2012


On 07/30/2012 05:44 PM, Hugo Veiga wrote:

> I'm having trouble in a regex in realm Handler:
> 
> <Handler User-Name=/^[a-zA-Z0-9][a-zA-Z0-9._-]/,
> Realm=/^[a-zA-Z0-9\.-]*?\.([a-zA-Z]){2,4}$/,
> Client-Identifier=/^(?!4ProxyServer$)/>

Hello Hugo,

I tried the handler and got this:

  ERR: Bad attribute=value pair: 4}$/,
Client-Identifier=/^(?!4ProxyServer$)/

Try this instead:

<Handler User-Name=/^[a-zA-Z0-9][a-zA-Z0-9._-]/,
Realm="/^[a-zA-Z0-9\.-]*?\.([a-zA-Z]){2,4}$/",
Client-Identifier=/^(?!4ProxyServer$)/>

I added the double quotes to surround the Realm value since the value
contains a comma.

Thanks,
Heikki

-- 
Heikki Vatiainen <hvn at open.com.au>

Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS,
TTLS, PEAP, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP,
DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS,
NetWare etc.


More information about the radiator mailing list