Error when using has2f in a manager rule
Concerned version
Version: 2.0.13
Platform: (Nginx/Apache/Node.js)
Summary
Summarize the bug encountered concisely Add a 2F triggering rule containing
has2f('TOTP')
as specified in doc
Logs
When saving config:
totp2fActivation: Bad expression: Can't use string ("TOTP") as a HASH ref while "strict refs" in use at /usr/share/perl5/Lemonldap/NG/Common/Safelib.pm line 249, <FILE> line 2.
Possible fixes
This comes from the perlExpr test failing to evaluate the rule because has2f exists in SafeLib with a different signature
Solution: rename the internal method, it's never used directly