'Bad token' error is returned if just a regexp is employed to define serviceToken scope
Affected version
Version: All
Platform: All
Summary
ServiceToken scope can be defined by listing VH or by setting a regexp.
If just a regexp is used, serviceToken is not valid.
Logs
2023-09-27T10:56:29+02:00 [info] New request Lemonldap::NG::Handler::Server::Nginx GET /ws/interrogation/v1/sia
2023-09-27T10:56:29+02:00 [debug] Found token: Ncs3DVXOWIHKELrPG5hrbRPjBBsxpEIczn7yeTR8/rpvna6NXiwvsOzYUAUFM9wBJJn+9fLs8PcaSabSkVbzEGwE+bGFuDrgNtG3bw6lnu1FNo51eu9Ziwlu52afQ5E59rqhNLrHO10qfgJaxNW4cSN0RnETh9o1fUnr481yzndEPNLTkamqZKuk4tc5fjGsPyBryfF+JssJ3Kd+3P3xvw==
2023-09-27T10:56:29+02:00 [debug] Found epoch: 1695804950
2023-09-27T10:56:29+02:00 [debug] Found _session_id: 309701221aef41a79a20c63ef167c17e2f41d145702d2c9a879ddd72cf616881
2023-09-27T10:56:29+02:00 [debug] Found VHost regexp: federation?.dvsso.gendarmerie.fr
2023-09-27T10:56:29+02:00 [error] Bad service token
2023-09-27T10:56:29+02:00 [debug] [error] Bad service token
Possible fixes
Fix test
unless ( (@vhostRegexp or @vhosts) and $_session_id ) {