Count9 #7

Merged
tygozwolle merged 20 commits from count9 into master 2026-08-03 12:17:13 +02:00
Showing only changes of commit 9c2cbfa7b9 - Show all commits
+5 -6
View File
@@ -106,14 +106,13 @@ public class RadiusService : IRadiusService
Value = password
});
// Set Session-Timeout (in seconds)
long sessionTimeoutSeconds = (long)config.DefaultSessionTimeMinutes * 60;
// Set Session-Timeout to 60 seconds to force frequent re-authentication (validation)
_db.RadReply.Add(new RadReply
{
Username = username,
Attribute = "Session-Timeout",
Op = "=",
Value = sessionTimeoutSeconds.ToString()
Value = "60"
});
// Set Max-Octets (in bytes)
@@ -232,11 +231,11 @@ public class RadiusService : IRadiusService
profile.SessionTimeMinutes = newSessionTimeMinutes;
profile.DataLimitMb = newDataLimitMb;
// Update RadReply Session-Timeout
// Ensure Session-Timeout is strictly 60 seconds for frequent validation
var sessionReply = await _db.RadReply.FirstOrDefaultAsync(rr => rr.Username == profile.Username && rr.Attribute == "Session-Timeout");
if (sessionReply != null)
{
sessionReply.Value = (newSessionTimeMinutes * 60).ToString();
sessionReply.Value = "60";
}
else
{
@@ -245,7 +244,7 @@ public class RadiusService : IRadiusService
Username = profile.Username,
Attribute = "Session-Timeout",
Op = "=",
Value = (newSessionTimeMinutes * 60).ToString()
Value = "60"
});
}