daloRADIUS is an advanced RADIUS web management application for managing hotspots and general-purpose ISP deployments. It features user management, graphical reporting, accounting, a billing engine, and integrates with OpenStreetMap for geolocation. The system is based on FreeRADIUS with which it shares access to the backend database.
Hello,
It seems as if there is an issue with the date value format in the radcheck table.
To Reproduce
Steps to reproduce the behavior:
Go to 'Quick User Add'
Click on 'Expiration'
Choose a date.
Connect.
RADIUS Reply = Access-Reject
Log (1) sql: EXPAND SELECT id, username, attribute, value, op FROM radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id (1) sql: --> SELECT id, username, attribute, value, op FROM radcheck WHERE username = 'username' ORDER BY id (1) sql: Executing select query: SELECT id, username, attribute, value, op FROM radcheck WHERE username = 'username' ORDER BY id (1) sql: ERROR: Error parsing value: failed to parse time string "2024-08-23" (1) sql: ERROR: Error parsing user data from database result (1) sql: ERROR: Error getting check attributes rlm_sql (sql): Released connection (7) Need 2 more connections to reach min connections (3) rlm_sql (sql): Opening additional connection (8), 1 of 31 pending slots used rlm_sql_mysql: Starting connect to MySQL server rlm_sql_mysql: Connected to database 'radius' on Localhost via UNIX socket, server version 10.5.22-MariaDB, protocol version 10 (1) [sql] = fail (1) } # authorize = fail (1) Invalid user (sql: Error parsing value: failed to parse time string "2024-08-23"): [username] (from client REDACTED port 0) (1) Using Post-Auth-Type Reject
Log (2) sql: EXPAND SELECT groupname FROM radusergroup WHERE username = '%{SQL-User-Name}' ORDER BY priority (2) sql: --> SELECT groupname FROM radusergroup WHERE username = 'username' ORDER BY priority (2) sql: Executing select query: SELECT groupname FROM radusergroup WHERE username = 'username' ORDER BY priority (2) sql: User not found in any groups rlm_sql (sql): Released connection (9) (2) [sql] = ok (2) expiration: Account will expire at 'Aug 23 2024 12:00:00 +0330' (2) [expiration] = ok (2) [logintime] = noop
Hello, It seems as if there is an issue with the date value format in the radcheck table.
To Reproduce Steps to reproduce the behavior:
Log
(1) sql: EXPAND SELECT id, username, attribute, value, op FROM radcheck WHERE username = '%{SQL-User-Name}' ORDER BY id (1) sql: --> SELECT id, username, attribute, value, op FROM radcheck WHERE username = 'username' ORDER BY id (1) sql: Executing select query: SELECT id, username, attribute, value, op FROM radcheck WHERE username = 'username' ORDER BY id (1) sql: ERROR: Error parsing value: failed to parse time string "2024-08-23" (1) sql: ERROR: Error parsing user data from database result (1) sql: ERROR: Error getting check attributes rlm_sql (sql): Released connection (7) Need 2 more connections to reach min connections (3) rlm_sql (sql): Opening additional connection (8), 1 of 31 pending slots used rlm_sql_mysql: Starting connect to MySQL server rlm_sql_mysql: Connected to database 'radius' on Localhost via UNIX socket, server version 10.5.22-MariaDB, protocol version 10 (1) [sql] = fail (1) } # authorize = fail (1) Invalid user (sql: Error parsing value: failed to parse time string "2024-08-23"): [username] (from client REDACTED port 0) (1) Using Post-Auth-Type Reject
Expected behavior Access-Accept
FIX
Change the date format. From 2024-08-23 To 23 Aug 2024 12:00. https://freeradius.org/documentation/freeradius-server/4.0.0/howto/modules/expiration/index.html
Log
(2) sql: EXPAND SELECT groupname FROM radusergroup WHERE username = '%{SQL-User-Name}' ORDER BY priority (2) sql: --> SELECT groupname FROM radusergroup WHERE username = 'username' ORDER BY priority (2) sql: Executing select query: SELECT groupname FROM radusergroup WHERE username = 'username' ORDER BY priority (2) sql: User not found in any groups rlm_sql (sql): Released connection (9) (2) [sql] = ok (2) expiration: Account will expire at 'Aug 23 2024 12:00:00 +0330' (2) [expiration] = ok (2) [logintime] = noop
Screenshots
Regards,