# HG changeset patch # User bsw # Date 1623092311 -7200 # Node ID 8fde003bdeb046605fcff412f74e12d3feacd2e9 # Parent 5039d071d3618e07870724aeef7a51a7a997c73b Added support for alternative DN string diff -r 5039d071d361 -r 8fde003bdeb0 app/main/oauth2/token.lua --- a/app/main/oauth2/token.lua Tue Jun 01 14:24:03 2021 +0200 +++ b/app/main/oauth2/token.lua Mon Jun 07 20:58:31 2021 +0200 @@ -62,6 +62,9 @@ if cert_distinguished_name then cert_common_name = string.match(cert_distinguished_name, "%f[^/\0]CN=([A-Za-z0-9_.-]+)%f[/\0]") if not cert_common_name then + cert_common_name = string.match(cert_distinguished_name, "^CN=([A-Za-z0-9_.-]+)") + end + if not cert_common_name then return error_result("invalid_client", "CN in X.509 certificate invalid") end else