feat: implement RadiusService for guest registration, session management, and usage tracking
Build and Push Docker Image to Gitea Container Registry / build-and-push (push) Successful in 1m41s
Build and Push Docker Image to Gitea Container Registry / build-and-push (push) Successful in 1m41s
This commit is contained in:
@@ -336,6 +336,13 @@ public class RadiusService : IRadiusService
|
|||||||
if (profile.Status == "Revoked")
|
if (profile.Status == "Revoked")
|
||||||
{
|
{
|
||||||
profile.Status = "Active";
|
profile.Status = "Active";
|
||||||
|
|
||||||
|
// Remove the zeroed NT-Password that was set on revoke
|
||||||
|
var ntPasswordCheck = await _db.RadCheck.FirstOrDefaultAsync(rc => rc.Username == profile.Username && rc.Attribute == "NT-Password");
|
||||||
|
if (ntPasswordCheck != null)
|
||||||
|
{
|
||||||
|
_db.RadCheck.Remove(ntPasswordCheck);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await _db.SaveChangesAsync();
|
await _db.SaveChangesAsync();
|
||||||
|
|||||||
@@ -2,4 +2,10 @@ mschap {
|
|||||||
# Send MS-CHAP-Error with E=691 on authentication failure,
|
# Send MS-CHAP-Error with E=691 on authentication failure,
|
||||||
# so iOS / Windows show "Incorrect Password" instead of "Unable to join network".
|
# so iOS / Windows show "Incorrect Password" instead of "Unable to join network".
|
||||||
send_error = yes
|
send_error = yes
|
||||||
|
|
||||||
|
# Force the rejection format to return the MSCHAPv2 failure code
|
||||||
|
# (Error 691 explicitly maps to an incorrect password on iOS)
|
||||||
|
passchange {
|
||||||
|
ntlm_auth = "/usr/bin/ntlm_auth"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user